Dependent LOVs in form

Guys,
I do have two fields of LOV types on my form
LOV attached to first field should display all the department. And second field should display all the employees assigned to the department selected in first field. Thats how I need dependent LOVs.. can you please guide me how it can be achieved.
Thanks
Sunil

Hi Sunil
second field should display all the employees assigned to the department selected in first field. Thats how I need dependent LOVs.Here is an example...
Let's Suppose u have a rel between dept & emp table related with a FK called DEPT_NO that's what it should be
Now when u select the 1st Lov it will disploay the DEPT_NO of the dept u selected this DEPT_NO will be displayed on ur form or will be hidden it doesn't matter.
Now in the second LOV Record group u should write a similar select statment as follow...
SELECT EMP_NAME,... etc.
FROM EMP
WHERE DEPT_NO = :DEPT_NO ;     Pls note that :DEPT_NO is the number of the department selected form the first lov in ur form, then all emp data will be displayed according to this DEPT_NO as ependent LOVs.
Another approach u should be aware and think about it...
u could u a drop down list dependent on one another specially if u don't have large number of departments in ur company.
Hope this helps...
Regards,
Amatu Allah.

Similar Messages

  • How to refresh Portal form with dependent LOVs ?

    I have a portal form which has dependent LOVs, the first LOV is
    a Site LOV and the next LOV is a Teacher LOV. Once a Site is
    selected, the form refreshes to load the Teacher's LOV with
    teachers belonging to the selected Site.
    In some cases the Site is assigned internally (using Javascript)
    in such cases the form does not refresh automatically; which
    causes the problem, as all the Teachers of all the Sites are
    loaded in the LOV.
    Any suggestions are welcome.
    Thanks,
    Hilal

    Put this code into the javascript onChange event of the list box
    that you want to automatically refresh the screen with:
    do_event(this.form,this.name,1,'CUSTOM','');
    that should cause the screen to refresh when an item is chosen.
    at that point, the 2nd list box (if you used the :paremter in
    the LOV and bound it to the right field in the form) should come
    up with the proper set of values Thanks Michael,
    But my problem is not with that part of refreshing; that is
    refreshing, when a value is picked from the first LOV to re-load
    the second LOV works fine.
    My problem is only when the value of the first LOV is internally
    set, the form does not refresh to re-load the second LOV. The
    value of the first LOV is loaded(internally) using one of the
    fields in "wwsec_api.person_info", eventhough this value is set,
    it does not trigger a refresh to re-load the dependent second
    LOV.
    I guess a solution to this problem would be to explicitly
    refresh the form (I am not able to figure out how).
    Hope I have clarified myself.
    Thanks.

  • Mandatory fields on the same page with dependent LOVs

    Hi,
    I am working on an ADF-BC application using JDeveloper 10.1.3.4
    I have an ADF Creation form with dependent LOVs and while implementing dependent LOVs we set the autoSubmit property of the selectOneChoiceListBox as true.
    If I have some mandatory fields on the same page then because of the autoSubmit property set as true whenever I select a value in the list the page gets submitted and the mandatory fields give an error that the values are required therefore I had to remove the mandatory fields.
    I tried using f:subview but even that dint serve the purpose because what I want is something like partialSubmit so that my mandatory fields do no give an error when I select a value in the list.
    Can somebody help me on this, how to have a dependent list and mandatory fields on the same page.
    P.S: It is very crucial for my application
    Thanks,
    Raksha

    Hello,
    This bug has been around since 10.1.3, its even still present in Trinidad and now in 11.
    One of the ways to avoid is to make your fields use:
    showRequired="true"instead of
    required="true"I have not found a decent way to avoid this in general.
    My idea was that this shiould be possible with a phaselistener and determine if this is a partial page event instead of a normal submit, but this didnt work.
    -Anton

  • Dependent LOV throws Exception

    Hello,
    I want to implement a dependent LOV:
    I have a LOV Competency and a dependent Proficiency LOV.
    e.g. in Competence LOV I search for Oracle DBA then I only want the Proficiency level concering to Oracle DBA
    e.g. certified, not certified.
    The leading Competence LOV I have, does have the following select:
    SELECT <b>COMPETENCE_ID</b>,
    SEGMENT1
    FROM PER_COMPETENCES_V
    ORDER BY COMPETENCY
    The dependent Proficiency LOV
    SELECT <b>cpl.COMPETENCE_ID</b>,
    cpl.NAME COMPETENCY,
    cmp.RATING_SCALE_ID,
    rsl.NAME RATING_SCALE_NAME,
    <b>rtl.RATING_LEVEL_ID</b>,
    rtx.NAME RATING_SCALE_LEVEL_NAME
    FROM PER_COMPETENCES cmp,
    PER_COMPETENCES_TL cpl,
    PER_RATING_SCALES rsc,
    PER_RATING_SCALES_TL rsl,
    PER_RATING_LEVELS rtl,
    PER_RATING_LEVELS_TL rtx
    WHERE 1=1
    AND cpl.COMPETENCE_ID = cmp.COMPETENCE_ID
    AND cpl.LANGUAGE = USERENV ('LANG')
    AND cmp.RATING_SCALE_ID =rsc.RATING_SCALE_ID(+)
    AND cmp.RATING_SCALE_ID = rsl.RATING_SCALE_ID(+)
    AND rsl.LANGUAGE(+) = USERENV ('LANG')
    AND rtl.RATING_SCALE_ID IS NOT NULL
    AND rtl.RATING_LEVEL_ID = rtx.RATING_LEVEL_ID
    AND rtx.LANGUAGE = USERENV ('LANG')
    AND rtl.RATING_SCALE_ID = rsc.RATING_SCALE_ID
    AND rsc.TYPE='PROFICIENCY'
    ORDER BY cmp.COMPETENCE_ID, rtx.RATING_LEVEL_ID
    In both LOV Regions I use form values as NUMBER fields.
    form values:
    Competency LOV =>Competence_ID (Number)
    Proficiency LOV =>Competence_ID (Number),Rating_Level_ID (Number)
    Then I did the mappings for both LOVs. Additionally to Proficiency LOV mapping
    I add a mapping to get a conjunction between from Proficiency Level to Competence LOV
    The necessary mapping within Proficiency Level Region is as follows.
    LOV Region Item =>xxmiProfCompetenceID
    Criteria Item => CompLOV
    Everything renders fine, I can choose a comptency with a return value but when I search for a dependent Proficiency level
    I got the following error message =>
    The value Oracle DBA specified for the item xxmiProfCompetenceID
    oracle.apps.fnd.framework.OAException: The value Oracle DBA specified for the item xxmiProfCompetenceID is an invalid number.
    I have checked the column xxmiProfCompetenceID also in view object and there the value is also a number field.
    Can someone help me, please.
    Thanks
    Robert

    Hi Robert,
    The error suggest that value "Oracle DBA" is getting assigned for the item xxmiProfCompetenceId, please check.
    Regards,
    Reetesh Sharma

  • Dependant LOVs - WEB

    Hello,
    I have one composite foreign key that consists of 3 columns,
    which belongs to three different tables (there are
    master-detal-detail relationships between those 3 tables). Let's
    call those tables A, B and C.
    Now, I'd like to generate wsg module (based on table D) that has
    all three columns displayed. Also, I'd like to generate three
    dependant LOVs in such way that I am able first to select row
    from table A using first LOV. Second LOV should display rows from
    table B, but only those rows that are in context of A. Similary,
    third LOV should display rows from table C, but only rows in
    context of B.
    Is there any way to this in Designer 6i? This way was
    default behaviour in Designer 6.
    Thanks.

    In Designer 6i you have to create LOVs in the Module->List of Values/Reusable List of Values section or you can use utility Default list of Values. These LOVs must be attached to the desired items in the Associated List of Values section.
    This is from the on-line help:
    The new repository LOV element simplifies the process of LOV generation by decoupling LOVs from lookup table usages. You can read these topics:
    - "Features added for design and generation in 6i"
    - "Oracle Forms List of Values (LOV) generation"
    I hope this will help you.
    Helena

  • How to create dependent LOVs

    Hi all,
    Does anyone know how I can create a LOV with values dependent on the LOV value selected from the one above when defining a custom item?
    For example, I have defined a custom item which has 2 attributes with 2 LOVs:
    attribute1 - LOV1
    attribute2 - LOV2
    I would like to populate LOV2 depending on what value the user selects in LOV1, is this possible?
    Please advise.
    Thanks.

    Hi,
    You can create dependant lovs and use them only in the forms component. Here is how you create dependant lovs
    lov1
    select empno,ename
    where deptno = :dept
    Creating a LOV with a bind variable makes it a dependant lov. In forms you should map the bind variable to one of the form columns.
    Thanks,
    Sharmila

  • Dependent LOV against poplist

    Hi,
    I have created an attribute of style messageChoice and another one of message LovInput. In the LOV mappings for the second one I have added new mapping say 'lovCriteria' and set the Criteria Item as poplist item.
    In the LOV region, I have created a formValue which is mapped to an attribute in the LOVVO instance which holds the same value as POPLIST.
    The Dependency validation is working fine like when try to click on LOV it says 'Poplist column must be selected.' but when I made the selection from POPLIST the LOV is not filtering accordingly. It shows the entire list.
    Any Advise what else I was missing? Thanks for the help.

    Hi Mukul,
    Yes I did, I think this is the only way to pass the dependent value to LOV to filter the data. The details are
    In the LOVVO I have columns A, B, C
    In the LOVRN I have A (messageStyledText), B (messageStyledText) and C (messageStyledText) are mapped (i.e. View Instance to LOVVO and View Attributes are A, B and C (messageStyledText) respectively. A, B are 'Search Allowed' set to True.
    In the queryPG I have 2 attributes Q1 and Q2 where Q1 is a POPLIST item and Q2 is a LOV item and Q3.
    In the queryPG for Q2 I have 3 LOV mappings
    1 q3 - mapped to
    2 q2 - mapped to B
    3 q1 - mapped to C which is criteria item.
    Criteria item Properties set to      Q1 and LOV region set to C (i.e. I would like to filter the LOV by Q1 in the qeuryPG which is equal to column 'C' in the LOV.
    Also I have set the properties 'Required' is 'True' and 'Programatic Query' to 'True'.
    I think this is all we need to do for dependent LOV. Or am I missing something?
    When I try to access the LOV on Q2 it displays OA default error message, I must enter Q1 i.e. the dependency part is working fine.
    But when I select the value for Q1 and go to LOV and hit go button it is not filtering the data for the value in Q1.
    It displays the entire list.
    Let me know if I miss something. In Dev guide they explained to create a 'formValue'. My question is the criteria Item should be mapped to a form value in the LOVRN or a 'messageStyledText' ?
    Thanks for your help.

  • Problem with cascading dependent LOV query running when it should not

    I have a page fragment with a regular ADF form on it that I use to add new entries to a table. This form has many fields on it with LOV’s associated with them. I have dependent LOV’s on some of them. The one case I have is I have three fields A, B, and C. Field C is dependent on A and B. The problem I seem to be having is when I enter a value for field A using it’s LOV, I get an hourglass for a long time after I select it and before it is displayed on the form. If I delete field C from the form the problem goes away. If I change the query behind the view for the LOV for field C to include a rownum < 20 in the where clause the problem goes away. My question is, why would the selection of a value for field A cause the query to fire for field C’s LOV view and how can I stop it. I don’t really want to use the rownum in the where clause.

    i had lot of question?
    The problem I seem to be having is when I enter a value for field A using it’s LOV, I get an hourglass for a long time
    ok. are using? any complex query to pick the lov 'a' .
    Answer: The LOV for A is based on a read only non-EO view with a SQL that is not really very complex. The LOV definition does set multiple values when the selection is made to blank out dependent fields in the data model used by the main form.
    after I select it and before it is displayed on the form.
    here i cant undestud?
    Answer. The order of things is I open the main form, I click the mag glass to open the LOV popup, I select the row I want and click the OK button. Navigation returns to the main form where I get the hourglass waiting for the selected value to be displayed in the field on the main form.
    If I delete field C from the form the problem goes away. If I change the query behind the view for the LOV for field C to include a rownum < 20 in the where clause the problem goes away.
    ok.
    why are you going to delete the value of c?. At intial stage you can make empty after selecting a and/or b you can load into c.
    Answer: I physically deleted field C from the main form to see if that was what was causing the long delay. When I run the main form without field C I do not get the hourglass. That is how I know they are related.
    My question is, why would the selection of a value for field A cause the query to fire for field C’s LOV view and how can I stop it.
    you may set partial trigger to c depends for 'a'.
    or else lov 'c' query depends on 'a'
    Answer. The query for C's LOV does depend on the value returned when I select a value for A. They are cascading LOV's. Will setting the partial trigger stop the SQL for field C from running? Is the SQL running because I'm blanking out field C when I change the value for field A?
    am not sure i understud correctly. can you pictuarize you problem with an example.

  • ADF Desktop Integration: How do I use dependent LOVs in Table Components?

    Hi,
    I have a table component that has a series of dependent LOVs. Now, while I understand that ADFdi allows for LOVs to be chained together by dependency, what I don't understand is how to get the child values to change based on a selection of a parent value. Is there a method binding I missed? Or is there some other mechanism I'm not seeing in the documentations? Hope someone can help shed some light on it - Google is darkness. Thanks.
    Cheers,
    Benjamin

    Repost

  • Dependent LOVs in Discoverer Admin

    Hi All,
    Can we create dependent LOVs in Discoverer. If yes can anyone throw some light that.
    regards,
    gt1982

    Well, let me try to clarify what Tamir said. I think you probably will need to do some setup work in Administrator. I am assuming that you want to do something like this in a worksheet - The user first clicks the LOV indicator on the Region parameter and picks a region from the Region LOV (say they pick the East region value), and then based on that region value, when they click on the City parameter LOV icon, the list of cities they see is filtered so that they only see cities in the East region (say New York City and Boston). To do this correctly in a worksheet, you need to define an Item Hierarchary in Discoverer Administrator. The two parameters must have some kind of relationship in the database to make this work.
    Then once you have the item hierarchy defined, the rest of your work is in Discoverer Plus. You create the first parameter in the worksheet. In my example, you would create the Region parameter first. Next you would create your second parameter (in my example, that would be the City parameter). When creating the second parameter, that is when that section on the parameter window ("Do you want to filter the list of values for this parameter") comes into play. You will want to select the "Filter the list of values based on the selected conditions" option, and then find the condition name (for the Region parameter created condition) and select that condition. The term Oracle uses for this is "Cascading Parameters". So if you search on that term in the Discoverer Plus user guide, that will give you more information on this process.
    Now, you do have to be careful. Ideally the folder with the relationship between the two parameters is based on a master table, not a detail table. If based on a detail table, you can run into performance problems when clicking on the LOV icon for the second parameter. The system may take forever to try to build that second LOV.
    But the process does work. I have used it a couple of times.
    Hope this helps a bit. Good luck.
    John Dickey

  • Getting error in dependent LOV

    jdev version: 10.1.3.3
    I have a dependent LOV in a page. It works fine except in one scenario. When I enter partial value in dependent LOV field and click torch icon, it gives following error:
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT org.organization_id, org.name org_name, org.attribute1 product_group, decode(org.attribute6, 'Y', 'Union', 'Non-Union') union_indicator, org.attribute7 union_name, bg.name bg_name
    FROM hr_all_organization_units org
    , hr_all_organization_units bg
    WHERE SYSDATE BETWEEN NVL(org.date_from, SYSDATE) AND NVL(org.date_to, SYSDATE)
    AND bg.organization_id = org.business_group_id
    AND bg.name = 'Test BG'
    AND SYSDATE BETWEEN NVL(bg.date_from, SYSDATE) AND NVL(bg.date_to, SYSDATE)
    ORDER BY org.name) QRSLT WHERE (product_group = :1 AND ( UPPER(ORG_NAME) like UPPER(:2) AND (ORG_NAME like :3 OR ORG_NAME like :4 OR ORG_NAME like :5 OR ORG_NAME like :6)))
    ## Detail 0 ##
    java.sql.SQLException: Invalid column type
    In order to populate dependent LOV based on independent LOV value, in LOV region CO.processRequest(), I am executing following am method:
    public void executeOrgLov(String criteria)
    OAViewObjectImpl vo = getLegalChgOrganizationsVO1();
    vo.setWhereClause("product_group = :1");
    vo.setWhereClauseParams(null);
    vo.setWhereClauseParam(0,criteria);
    vo.executeQuery();
    Any suggestion/help in this regard is highly appreciated.
    Thanks

    Hi,
    modify your code as follow,
    public void executeOrgLov(String criteria)
    OAViewObjectImpl vo = getLegalChgOrganizationsVO1();
    //vo.setWhereClause("product_group = :1");
    //vo.setWhereClauseParams(null);
    //vo.setWhereClauseParam(0,criteria);
    // I assume criterian is a string variable.
    if (criteria!=null) {
    vo.setWhereClause("product_group = "+criteria);
    vo.executeQuery();
    I hope it will solve your issue.
    Haroon.

  • Using Dynamic LOV in Forms

    Hi Everybody,
    I am making forms based on procedures in 9iAS Portal. I am using two parameters for the form. One is Item Code for which I am having a simple LOV with sql statement. Other LOV has a dynamic Sql statement which accepts the Item_code as parameter and displays records containing the item_code. When I run the Lov seperately through navigaror it runs properly but when I used the lov through form and passed the item_code to it, on runtime it says that the lov is based on dynamic sql and unable to show results.
    Can anybody please help me out of this problem.
    Thanks in advance
    Warm Regards
    Vivek Bajaj

    When I tried to compile the following code in Forms, the compiler error I got was Encountered the symbol "STMT_STR" when expecting one of the following: select. However, when I run it in SQLPlus, it creates the function without any errors.
    FUNCTION my_func
    return number
    is
    TYPE DiaryCurTyp IS REF CURSOR;
    cur DiaryCurTyp;
    stmt_str VARCHAR2(200);
    dmonth NUMBER;
    dday NUMBER;
    BEGIN
    stmt_str := 'SELECT dmonth, dday FROM p2_diary
    WHERE dmonth = :1';
    OPEN cur FOR stmt_str USING '12';
    LOOP
    FETCH cur INTO dmonth, dday;
    EXIT WHEN cur%NOTFOUND;
    -- <process data>
    END LOOP;
    CLOSE cur;
    END;

  • How to create dependent LOV in Advanced Table.

    Hi,
    How to create dependent LOV in Advanced Table. Pls help send me the steps.
    Thanks in Advance,
    Hanimi....

    Hi,
    Not sure whether you need dependent LOV or dependent poplist. But anyways, you can refer the below link for Dependent LOV
    http://oraclearea51.com/component/content/article/98-oa-framework/372-dependent-lov-in-oaf.html
    and for Dependent Poplist refer the below link:
    http://oraclearea51.com/component/content/article/98-oa-framework/370-dependent-poplist-in-an-advanced-table-in-oaf.html
    Regards,
    Sudhakar Mani
    http://oraclearea51.com/sudhakarmani

  • How to incorporate dependent LOV in an Advanced Table

    Hi,
    I have an "Advanced Table". Two columns are LOV columns.
    Eg.
    In the first column I have an DeptLOV and second column has EmployeenameLOV.
    In first Column DeptLOV I choose say Deptno 10 and it should filter and list only the names of the employees in the second column EmployeenameLOV it should list only the employees of Departnumber 10 and I should be able to pick one employeename from EmployeeNameLOV.
    I should be able to choose different Dept number and corresponding employee name in LOV different in each row.
    Thanks in advance.
    Lacman

    Thanks for you reply.
    But the issue is the dependent LOV inside an advanced table as described in my earlier post.
    Advanced table with dependent LOVs
    . c1 c2
    r1
    r2
    r3
    If an end user clicks on r1c1 LOV. He should be allowed only to click on r1c2. If clicks on r1c1 and directly clicks r2c2 he should not be allowed.
    How to accomplish this in an Advanced table in which the second column LOV is dependent on the first LOV.
    Regards,
    Laxman
    Edited by: lacman on Nov 18, 2009 7:19 PM

  • Can't create multiple dependent LOVs from the same bind variable

    Hi all,
    I'm having difficulty creating multiple dependent LOVs from queries based on the same bind variable in my JSF application (JDev 10.1.3.1). Basically I have a static LOV in a af:selectOneChoice component from which users select a value which then becomes the bind variable value for two separate queries that generate two different dependent LOV. Having developed the code along the lines of Steve Muench 's blog (http://radio.weblogs.com/0118231/2006/04/03.html#a685), the first dependent LOV works really well. The first dynamic LOV gets refreshed whenever the list from the static LOV changes, and I can execute other queries based on the values selected.
    The problem arises when I want to create the second dynamic/dependent LOV that has the same bind variable based on the same selected value from the static LOV. Here I would also like the functionality whereby the second dynamic LOV is also refreshed after the selected value in the static LOV changes. Thinking that all I had to do was replicate the methodology used in creating the first dependent LOV, I created the second iterator, invokeAction and other binding components in the PageDef. The executable section now looks like the following:
    <iterator id="SelectStaticQueryViewObjIterator"
                  Binds="SelectStaticQueryViewObj" RangeSize="-1"
                  DataControl="DMSApplicationModule1DataControl"/>
    <invokeAction id="refreshDynamicQuery1BindParameter"
                  Binds="ExecuteWithParams1" Refresh="prepareModel"
                  RefreshCondition="#{empty requestScope.VariableChanged}"/>
    <iterator id="SelectDynamicQuery1ViewObjIterator"
                  Binds="SelectDynamicQuery1ViewObj" RangeSize="-1"
                  DataControl="DMSApplicationModule1DataControl"/>
    <invokeAction id="refreshDynamicQuery2BindParameter"
                  Binds="ExecuteWithParams2" Refresh="prepareModel"
                  RefreshCondition="#{empty requestScope.VariableChanged}"/>
    <iterator id="SelectDynamicQuery2ViewObjIterator"
                  Binds="SelectDynamicQuery2ViewObj" RangeSize="-1"
                  DataControl="DMSApplicationModule1DataControl"/>I now have a problem whereby everytime I change the value of the static LOV, multiple HTML components for the same ADF component are being generated (the LOVs are refreshed via PPR). The surprising thing is that this duplicating behaviour applies to all ADF components listed after the first dynamic LOV in the *.jspx source. For example, I have a <af:outputText="Test Text"/> component created after the first dynamic LOV. Each time the value in the static LOV changes, a duplicate HTML component is created. This also applies to the 'related' second dynamic LOV which is bound to a af:selectOneChoice component - multiple dropdown lists are created. I've checked with the browser's Page Source and there are actually multiple html components being generated with their own unique ADF-generated IDs. I've tried all different options for the Referesh and RefreshCondition attibutes in the second invokeAction element but nothing seems to eliminate this issue.
    Any suggestions about how I might create multiple dependent LOVs from the same bind variable that get refreshed when the selected value changes would be greatly appreciated.
    Thanks
    George

    Hi all,
    Just updating the thread on how I've overcome this issue. As it stood the manner in which I was trying to solve my use case, as described above, was creating an absolute mess. Then with a blank sheet of paper I quickly realised that a much simpler solution would be to create a whole series of master-detail VOs and build my components around them. Thankfully I haven't had any issues going down this path as yet.
    Cheers
    George

Maybe you are looking for

  • Vertical Text in Tabels

    I wonder how I can flip text in a single cell of a table to vertical orientation? Thanks for any support.

  • Adding drives to storage pool with same unique id

    i have seen a lot of discussion about using storage pools with raid controllers that reporting the same unique id across multiple drives.  I am yet to find a solution to my problem is that i can't add 2 drives to storage pool because they share the s

  • Forms Personalization:Procedure

    I have a requirement to pass value from fields to a procedure and the output of the procedure need to be set as a default field in another form field. Can anyone provide sample code for passing the form field values and setting the value back in the

  • Combine order quantities across multiple lines on sales order

    Hello All, I have a requirement to combine the quantities from two order lines to determine quantity based scales.  The scenario is as follows: Item 10 - Material 1 - 1000 KG Item 20 - Material 2 - 1000 KG Combine 1000 + 1000 = 2000 and redetermine s

  • WRT110 Error Message

    I'm trying to get a second desktop to run on my WRT110 RangePlus router. I already have an ethernet cable plugged in, but my second desktop still won't recognize the plug, and it's also not recognized by the EasyLink Advisor program. When I try to ad