Resetting cascading LOVs

Hi.
I have a problem (who doesn't?). Picture this:
I have 5 cascading LOVs. Each LOV includes a null value for "Not Defined", which is produced like this:
select trim(name), value
from table
where column = :VAR_FROM_PREVIOUS_LOV
union all
select ' Not defined', null
from dual
order by 1
Notice that the value ' Not defined' has a leading blank and will always be the one displayed in the LOV before a selection is made because that leading blank will sort before the other values. Each LOV is driven from a different table.
Each LOV is a "Select with submit" with Source type "Only when current value in session state is null".
Branching to same page is in place for the requests associated with these LOVs.
This works fine, apart from one nasty detail:
Imagine you set LOV1. LOV2 has now the values associated with the selection of LOV1, right?
You then proceed selecting LOV2, LOV3, LOV4 and LOV5 in sequence. Ok, it works fine so far.
But now the user changes his/her mind, and resets the value in LOV2. One would expect that LOV3 would now contain the values associated with the new value in LOV2. Well, that is, in fact, the case. But since LOV3 is showing ' Not defined', one would also expect LOV4 and LOV5 to be reset with the only value of 'Not defined'. Well, it doesn't happen! LOV4 and LOV5 still carry the previous selection, which is now unrelated with the selection of LOVs 1,2 and 3.
The thing acts as if all LOVs were calculated at the same time on submit, instead of being reset in sequence, one after the other, which is what I hoped would happen, following their sequence number.
Does anyone have any way around this behaviour?
Thanks,
Paulo Terca

Hi, Scott.
Thanks for replying. I realize my description may have been a bit confusing.
I'll give an example: Imagine several tables, each one a detail of the previous, like, for instance:
Regions
Countries
Country_regions
Cities
Suppliers
Now picture 5 LOVs, one for each attribute. Only the "Regions" LOV has values. When you select a Region (e.g., EMEA), the LOV for Countries gets populated. You now select a country, and the LOV for Country_regions gets populated. Once you get to the city, you will get a list of suppliers from that city. You select a supplier and get the details of that supplier.
Now the things is: imagine you are satisfied with your search and want to check on another supplier that lives in China. You want to select "Asia" from the first LOV and expect that the LOV for countries will be populated with all asian countries, but all other LOVs will be reset to a state of emptyness, right? You don't want to be seeing "Asia" and still see "Paris" for the city and whatever supplier was previously selected.
So, what I did was that in each LOV I would have a SELECT that would have a WHERE clause dependent of an attribute taken from the previous LOV:
LOV1: select name, id from regions
LOV2: select name, id from countries where region_id = :P10_REGIONS
LOV3: select name, id from country_regions where country_id = :P10_COUNTRIES
LOV4: select name, id from cities where country_region_id = :P10_COUNTRY_REGIONS
LOV5: select name, id from suppliers where city_id = :P10_CITY
All selects have submit. Well, if you try this, you'll see that after making the first run through the LOVS, when you try a different selection on the first, the 4th and 5th will still have the previous city and supplier.
I managed to solve this problem in the following way:
LOV1: select name, id from regions
LOV2: select name, id from countries where region_id = :P10_REGIONS
LOV3: select name, id from country_regions where region_id = :P10_REGIONS and country_id = :P10_COUNTRIES
LOV4: select name, id from cities where region_id = :P10_REGIONS and country_id = :P10_COUNTRIES and country_region_id = :P10_COUNTRY_REGIONS
LOV5: select name, id from suppliers where region_id = :P10_REGIONS and country_id = :P10_COUNTRIES and country_region_id = :P10_COUNTRY_REGIONS and city_id = :P10_CITY
It's messier, but works.
Anyway, thanks again for your input.
Regards,
Paulo Terca

Similar Messages

  • Resetting a Form with Cascading LOVs (Apex 4)

    A standard reset button cannot reset cascading LOVs properly. Let's assume we have a parent LOV and a child LOV. When one changes the selection in the child LOV, reset can undo this. But when he changes the selection in the parent LOV, reset will undo only the parent LOV but not the child LOV. The child LOV remains unchanged (however the selection is lost) and therefore shows a list that does not correspond to the entry now shown in the parent LOV.
    Has anybody found a solution for this, a reset action that can reset cascading LOVs completely and properly?
    Regards
    Roland

    Roland,
    i didn't try this myself but maybe you succeed with triggering the onchange-event of your parent-select-list (this should cause the child select-list to be refreshed).
    Or you could try if a form region has a apex "refresh" event (i know that refresh works on reports).
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • How to prevent apex 4.0 shuttle cleared by cascading LOV setting?

    I have a shuttle control for choosing a list of database users populated from a child table by an On Load - After Header process, which then repopulates the child table in an On Submit - After Computations and Validations process. Work fine.
    I then set the shuttle's Cascading LOV Parent Item(s) to a text item that could be used for filtering the shuttle's LOV, and revised the LOV SQL to a) use the filter and b) include items stored in the child table, i.e.:
    select username as dv, username as rv
    from all_users
    where username like upper(:P5_USERSFILTER) || '%'
    union
    select username, username
    from user_grouping_users
    where groupid = :P5_GROUPID
    order by 1
    Unfortunately, when the filter value changes (P5_USERSFILTER), the state of shuttle (as set in my On Load - After Header process) is cleared. The values from the child table are properly included in the LOV, but they are no longer selected -- so the appear in the left-hand list as candidate values but not in the right-hand list as selected values. Additionally, any items selected in the shuttle before changing the value of the LOV Parent (:P5_USERSFILTER) are no longer selected.
    Is there a way to prevent the selections of a Cascading LOV item from being cleared when the parent item is reset?
    Note, I've specified 'No' for Optimize Refresh, and 'P5_USERS' for Page Items to Submit and 'Yes' for Display Extra Values (which in general does not seem to have any affect on a shuttle LOV)

    Hallo all!
    I got a similar situation: a text item that filters the left side of an shuttle item (P11_IAG_ENUM), but the right side should stay the same - independet from the text item, where search-phrases are entered.
    So I tired with your example - thanks for that - but I changed the code that I only have one collection 'P11_IAG_VALUES' ... but right side seems to be still dependend from the search item. I also deleted the "set value" action of the "save current selection"-dynamic-action, because I supposed it's not needed.
    Here is my "save current selection"-dynamic-action:
    DECLARE
    c_collection CONSTANT VARCHAR2(30) := 'P11_IAG_VALUES';
    l_seq_id NUMBER;
    BEGIN
    IF NOT apex_collection.collection_exists(c_collection) THEN
    apex_collection.create_collection(c_collection);
    END IF;
    SELECT MIN(seq_id)
    INTO l_seq_id
    FROM apex_collections
    WHERE collection_name = c_collection
    IF l_seq_id IS NULL THEN
    apex_collection.add_member (
    p_collection_name => c_collection,
    p_c001 => :P11_IAG_ENUM );
    ELSE
    apex_collection.update_member (
    p_collection_name => c_collection,
    p_seq => l_seq_id,
    p_c001 => :P11_IAG_ENUM );
    END IF;
    COMMIT;
    END;
    ... and the "restore old selection"-dynamic-action:
    DECLARE
    l_selected_iag VARCHAR2(32767);
    BEGIN
    SELECT c001
    INTO l_selected_iag
    FROM apex_collections
    WHERE collection_name='P11_IAG_VALUES'
    RETURN l_selected_iag;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
    RETURN NULL;
    END;
    Where is my error in reasoning?
    (Meanwhile I try to create an example application...)
    [Edit: I got problems to acces my workspace, try to reset my password --> error, even try to find my workspace -->error .... everytime the same; I'll try it later again, but hoping that anyone can help me without example application]
    Edited by: kc7 on 10.09.2010 09:20
    [Edit II: I finally created a example-application: *http://apex.oracle.com/pls/apex/f?p=30216*
    workspace: kc7
    user: dummy
    pwd: doll
    Edited by: kc7 on 10.09.2010 12:28

  • Cascading LOV in a Tab Form Help

    version 4.0.2.00.07
    Hello,
    I've aquired an application that was written by someone else. I have a Tab Form that needs a Cascading LOV. There is code already in place, but I have questions about it that I'm hoping someone can help.
    There's a LOV called Product Group that has an onChange in the Element Attributes:
    onchange="f_load_platform(this.value,#ROWNUM#);"In the HTML Header is a javascript function:
    function f_load_platform(p_pg_id, p_rownum){
       if (p_pg_id) {
          v_new_list = html_GetElement('f04_'+ f_zero_pad(p_rownum,4));
          v_curr_value = v_new_list.value;
          var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=Get_Platform_From_Product_Group',0);
          get.add('P21_PRODUCT_GROUP_ID_PARAM',p_pg_id);
          gReturn = get.get();
          if (gReturn) {
             // Separate each combination set of values
             var NameArray = gReturn.split(",");
             // Reset dropdown list by making its length to a needed value
             v_new_list.length = NameArray.length-1;
             for(i=0; i < NameArray.length; i++){
               NameArrayList = NameArray.split("~");
    if(NameArrayList[0] != "") {
    v_new_list[i].value = NameArrayList[0];
    v_new_list[i].text = NameArrayList[1];
    if(NameArrayList[0] == v_curr_value) {
    v_new_list.selectedIndex = i;
    else {
    v_new_list.length = 0;
    function f_zero_pad(num,count)
    var numZeropad = num + '';
    while(numZeropad.length < count) {
    numZeropad = "0" + numZeropad;
    return numZeropad;
    The Add Row button is set to:
    Action: Redirect to URL
    Execute Validations: Yes
    URL Target: javascript:addRow();
    When I debug the javascript the variable v_new_list shows as false. I can also see that p_rownum variable in the javascript function contains 0.  I don't know if that's correct.
    Can someone help me with why this function does not return the values into the select list for the f04 item?
    What other information can I provide?
    Thanks,
    Joe                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Scott,
    Thank you for replying.
    While debugging the javascript, I can see that gReturn does contain a string of the Platforms for that Product Group ID.
    What I don't know if it's correct is the call to: v_new_list = html_GetElement('f04_'+ f_zero_pad(p_rownum,4));
    When I view source I see that f04_0000 is the Platform select list item.
    <td headers="PLATFORM_ID" class="t13data"><label for="f04_0000" class="hideMe508">PLATFORM_ID</label><select name="f04"  id="f04_0000">...I don't know why the previous developer wrote a function to append the four zero's to the item, but I get the same result when I take out the padding call and replace it with the four zero's so the statement looks like this: v_new_list = html_GetElement('f04_0000');
    I still can see that v_new_list is undefined in the debugger. Any other ideas?
    Thanks,
    Joe

  • 4.2.1 Bug: Current values of child cascading LOVs are LOST.

    Hello, ApEx Team!
    This bug affected 4.1.1 and 4.2.1 but with different behavior. It seems that someone was trying to fix it.
    According to docs "whats new in 4.1" a value of refreshed child cascading lov is derived from default value settings of select list.
    Please follow these steps to see the bug.l builder-work done for you here http://apex.oracle.com/pls/apex/f?p=14110:1
    1.Create primary select list P1_SEL1.
      Display null value: Yes
      LOV definition:
        select 'aaa' name,'a' id
          from dual
         union all
        select 'bbb' name,'b' id
          from dual
         union all
        select 'ccc' name,'c' id
          from dual2.Create child select list P1_SEL2.
      Cascading LOV Parent Item: P1_SEL1
      Page Items to Submit: P1_SEL2 (I strongly believe that this item should be submitted automatically along with Parent Item)
      Display Null Value: Yes
      LOV definition:
        select 'aaa' name,'a' id
          from dual
         union all
        select 'bbb' name,'b' id
          from dual
         where :P1_SEL1 in ('b','c')
         union all
        select 'ccc' name,'c' id
          from dual
         where :P1_SEL1 in ('c')
      Default: return :P1_SEL2;
      Default Value Type: PL/SQL Function Body3.Run app. and manually change P1_SEL1 and P1_SEL2 to 'bbb'.
    4.Manually change P1_SEL1 to 'ccc'.
    h2.
    In apex 4.1.1..
    you see that P1_SEL2 is resetted to NULL automatically. The value of P1_SEL2 is LOST. Although I tell apex to submit P1_SEl2 value to set its session state, but the session state still remains NULL.
    The session state of P1_SEL2 is always NULL and I have no idea how to set it as it is set in a browser at the moment of changing parent LOV P1_SEL1.
    h2.
    Now apex 4.2.1.
    It seems this bug is fixed. Indeed it is NOT fixed.
    To see this bug in 4.2.1 just...
    5.Create a third child select list P1_SEL3 which depends on P1_SEL2.
      Cascading LOV Parent Item: P1_SEL2
      Page Items to Submit: P1_SEL3 (Again, I hope you will always submit current item automatically as you do for the parent item)
      Display Null Value: Yes
      LOV definition:
        select 'aaa' name,'a' id
          from dual
         union all
        select 'bbb' name,'b' id
          from dual
         where :P1_SEL2 in ('b','c')
         union all
        select 'ccc' name,'c' id
          from dual
         where :P1_SEL2 in ('c')
        Default: return :P1_SEL3;
        Default Value Type: PL/SQL Function Body6.Run app. again. Manually set P1_SEL1, P1_SEL2 and P1_SEL3 to 'bbb'.
    7.Change P1_SEL1 to 'ccc' and see the bug:
    1) P1_SEL2 is reset to NULL for just a short time and than restored to 'bbb'.
    2) P2_SEL3 is reset to NULL. So the session state was NULL for this item at the moment of calculating default value. As a result the value of child cascading lov is LOST.
    So this bug is still present in 4.2.1.
    Can I hope to get workaround for this problem in 4.1 and 4.2?
    Thank you,
    Vladimir
    Edited by: vgoncharov on 17.12.2012 19:37
    Edited by: vgoncharov on 17.12.2012 22:45

    Good to hear this is already being worked on.
    When we tried to work around the "Automatic detection" bug - changing the "Application Language Derived From" to "Application Preference" or "Session" - we hit issue that some page processes were not firing in translated application.
    See Page processes not firing in Translated applications
    Jan

  • Cascading LOV - Keep Existing Value

    Need to stop Cascading LOV to reset the values and keep existing selected options IF VALID
    please have a look at the scenario
    Col-1     Col-2     Col-3
    A     AA     1
    A     BB     2
    A     CC     3
    B     AA     1
    B     AAB     2
    B     AAV     3When Col-1 value is A the LOV of Col-2 has values AA BB CC and Col-3 has 1 2 3
    and if Col-2 value is B the LOV of Col-2 has values AA AAB AAV and Col-3 has 1 2 3
    What is happening :
    » when user changes Col-1 from A to B Col-2 & Col-3 resets the user selected value (I think the default behavior)
    what is needed if user has selected "3" in Col-3 and changes Col-1 from A to B Col-2 & Col-3 should have user selected values IF VALID

    Yes, just to show it works. In your case, the second dynamic action has to be something like this:
    DECLARE
       v_empno   NUMBER;
    BEGIN
       SELECT empno
         INTO v_empno
         FROM emp
        WHERE deptno = :p292_deptno AND empno = :p292_empno;
       RETURN v_empno;
    EXCEPTION
       WHEN OTHERS
       THEN
          RETURN v_empno;
    END;since it needs to check if the value is in the range of alowed values. In my example I created a fake second entry which has the same ID and there it is enough to do RETURN item value session state.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Set Cascading LOV Item using Dynamic Action

    Hi all,
    I have the following page item:
    P1_USERNAME
    P1_COMPANY  (LOV)
    P1_DIVISION (LOV)
    P1_DEPT (LOV)
    Item P1_COMPANY, P1_DIVISION, and P1_DEPT are cascading LOV on my page.
    I also have a table that contains the user and his/her company, division, and department.
    So I have a dynamic action that when P1_USERNAME is entered. The dynamic action will pull the COMPANY, DIVISION, and DEPT information from the table and populate the page item accordingly.
    I got the dynamic action working, I can confirm this by checking the Session State of the items.
    BUT I cannot get the LOVs to display the selected value from the session state. They always reset back to "- Please Select -", which is my display value when NULL.
    For example:
    I have a record like in the table:
    Username :alex
    Company : Finance Inc.
    Division : Admin
    Dept : HR
    When I entered the username into P1_USERNAME, this is what I see in the screen.
    Username :alex
    Company : - Please Select -
    Division : - Please Select -
    Dept : - Please Select -
    While the session states of the items have been set correctly as per the record in the database.
    Has anyone experienced this before?
    I think it's because the parent LOV (company), reset the child LOVs (division and dept), when the dynamic action kicks in.
    Thanks.

    I've just taken a look at your sample page and don't think this issue is actually too complicated to solve. (Actually, it was I who was mucking around in page 1, sorry for that. I was looking at it and then had to go. Picked it up again later on and just made a copy this time)
    You change the employee. The dynamic action fires, executes plsql and sets the values in the company2/division2/dept2 fields
    Company 1 is a cascading lov. Empo has changed? Company refreshes. Cascading for division and dept as well.
    You can see this happening in sequence as well when looking at the page. Select emp, it'll hang for a second. You then get the select list refresh icons.
    The sequence in which this happens is of course a bit wrong. You set the values for the items on the client side first, but then their refresh is kicked in, and so the value setting is simply lost again.
    What makes this annoying is how P1_EMPNO is a cascading lov parent of P1_COMPANY. Changing P1_EMPNO will refresh the lovs beneath it. However, you can't simply set their values after you've retrieved the user's company/division/dept, because each lov is dependent on the one above it. Eg you change the employee. The company lov is refreshed. Because the it is refreshed, the division lov will refresh. Now you can set the value of the company lov, but not that of the division one. Why is this? The lov for division requires the value of company in the session state. If you'd set the value for company after it has finished refreshing, it will already be too late for division to pick up the value set. .
    I made a copy of your page to page 5, “tom”.
    The first I did was removing the cascade from the company lov. You don’t need this. There are simply no parent lovs for this lov, as is evident from the sql for it. The companies always remain the same companies even when you select another person; it is not dependent on another item for its values.
    Then the timing issues come in play, and with them there is also the issue of the session state.
    So now companies always show. You pick a user, it runs the PLSQL block and put values in the P5_xxx2 items. P5_COMPANY can be set now, and this is in the set value of the dynamic action. By not suppressing the change event, a refresh will be triggered on its cascading lov, P5_DIVISION.
    Refreshing P5_DIVISION will only get the new lov values (constrained within the chosen company) for this item though, and not set the value. We already have the values in P5_DIVISION2 however, and thus can use the “After Refresh” dynamic action on P5_DIVISION to do this. In short: company gets set, divisions refresh to show the correct divisions, and then the selected value is set. Again, by not suppressing the change event on this item the depending lov on DEPT will be refreshed.
    Then by using another “After Refresh” dynamic action on P5_DEPT we can set the selected value once more.
    Also important is that I changed P5_DIVISION to submit P5_COMPANY when it is refreshed, and P5_DIVISION when P5_DEPT is refreshed. This makes sure that the correct set of values is retrieved and probably why you were struggling aswell. After company has changed and division has refreshed, the value on division is set. But the correct divisions are shown only because the chosen company has been set in the session state.
    The same for division - dept. After the refresh of division, the chosen value for division is set. This change will trigger the refresh on dept, and because dept has the division in its page items to submit list, the correct values will be retrieved.
    Take note that the “debug items” are required in this solution though. Just set them as hidden and unprotect their value. Your goal should be to reduce the amount of roundtrips to the server. Why do a plsql (ajax) call just to retrieve a session state, when the value is already on the page and all in one action? Three hidden items is just so much easier than 3 extra ajax calls, the tradeoff is plenty.
    There is one more noteworthy point, and that is the fact that dept is being retrieved twice. That makes sense because of the cascading lovs. Initially company is changed, and this will refresh division and this in turn will trigger a refresh on dept. At this point the lov for dept will be empty, because division will be empty. Because we set the value of division again after it has refreshed, this will trigger a second refresh on dept, though now the correct list of values is retrieved because division has a value set. Not that big an issue, but good to point out. If you’d have another cascading lov beneath dept, it would refresh three times.

  • Get('XML') doesn't work, but get() does in javascript - CASCADING LOVs

    I'm trying to get cascading LOVs working in Apex 3.1.0 in Oracle 11g. When I call get.get('XML') it returns null in firefox and empty string in IE6. If I change it to call get.get() then it returns the XML as a string into Javascript.
    The Application process is getting called in both scenarios as i've put PL/SQL logging to disk in order to prove it. The XML being returned is very basic so i'm sure it's not a problem with formatting. I'm not getting any exceptions thrown in javascript either.
    Is it possible to use get.get() and then convert the text into an XML object which is returned as per get.get('XML') which at least will allow me to get something working ?
    thanks
    &lt;script language="JavaScript" type="text/javascript"&gt;
    function getBusinessFieldJS(pThis, pSelect)
    alert('getBusinessFieldJS');
    try
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var get = new htmldb_Get(null, html_GetElement('pFlowId').value, 'APPLICATION_PROCESS=GET_DATA_FIELDS_XML', 0);
    /*get.add('F120_GETBUSINESSFIELD_ITEM',pThis.value);*/
    gReturn = get.get('XML');
    alert('gReturn=' + gReturn);
    alert('gReturn.value=' + gReturn.value);
    if (gReturn == null)
    alert('gReturn is null');
    if(gReturn && l_Select)
    var l_Count = gReturn.getElementsByTagName("option").length;
    alert('l_count='+l_Count);
    l_Select.length = 0;
    for(var i=0;i&lt;l_Count;i++)
    var l_Opt_Xml = gReturn.getElementsByTagName("option")+;+
    + appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),+
    + l_Opt_Xml.firstChild.nodeValue)+
    + }+
    + }+
    +
    get = null;+
    + }+
    + catch (e)+
    + {+
    + alert('Exception : ' + e);+
    +
    }+
    +}+

    Hi,
    I've been trying to replicate your problem here: [http://apex.oracle.com/pls/otn/f?p=37055:1]
    My application process is:
    BEGIN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p('Cache-Control: no-cache');
    HTP.p('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn('<select>');
    HTP.prn('<option value="-1">Please Select</option>');
    HTP.prn('</select>');
    END;(Just copied from your post and XML changed to xml, otherwise untouched)
    And my page has a simple HTML region with the source of:
    &lt;div id="XMLOUTPUT" style="border:1px solid blue; width:200px; height:200px;"&gt;&lt;/div&gt;
    &lt;div id="XMLOUTPUT2" style="border:1px solid blue; width:200px; height:200px;"&gt;&lt;/div&gt;
    &lt;script type="text/javascript"&gt;
    function getMyXML()
    var l_Return = null;
    var get = new htmldb_Get(null, html_GetElement('pFlowId').value, 'APPLICATION_PROCESS=RETURN_XML', 0);
    gReturn = get.get('XML');
    var d = html_GetElement('XMLOUTPUT');
    d.innerHTML = gReturn;
    var d2 = html_GetElement('XMLOUTPUT2');
    d2.innerHTML = get.get();
    var s = gReturn.getElementsByTagName("select");
    alert(s.length);
    &lt;/script&gt;
    &lt;a href="javascript:getMyXML();"&gt;Click&lt;/a&gt;Click on Click at the bottom of the page. The first DIV gets the get.get('XML') object and the second one the get.get() and a popup message tells you how many "select" items are in the XML version.
    As far as I can see, this works fine.
    Andy

  • How to use a cascading LOV as a Web Services Consumer?

    How to use a cascading LOV as a Web Services Consumer?
    We are trying to populate a prompt programmatically.
    Our program is a Web Services Consumer.
    As an example we use Island Resorts Marketing
    The cascading LOV for City is
    Country -> Region -> City
    The City object is key-aware to the customer table
    The query is
    Customer | Revenue
    (where) City = [prompt]
    In order to make the key-awareness work, we must select the value (rowIndex) from the LOV
    When we run our program below, the LOV for City is not populated, as expected since we must first select the Country, then the Region.
    The code snippet below shows that the LOV for Country is populated. We have no idea how to go from there.
    Any hint will be immensely appreciated.
    Let us know if anything is unclear in the code.
    Source       
    RetrieveMustFillInfo retrieveMustFillInfo = RetrieveMustFillInfo.Factory.newInstance();
            RetrievePromptsInfo retrievePromptInfo = RetrievePromptsInfo.Factory.newInstance();
            retrievePromptInfo.setPromptLOVRetrievalMode(PromptLOVRetrievalMode.ALL);
            retrievePromptInfo.setRefreshReturnedLOVs(true);
            retrievePromptInfo.setReturnLOVOnMustFillPrompts(true);
            retrieveMustFillInfo.setRetrievePromptsInfo(retrievePromptInfo);
            // *-- need the "Refresh" action to get the .promptToBeFilled
            Action[] boActions = new Action[1];
            boActions[0] = Refresh.Factory.newInstance();
            try {
                documentInformation = reportEngine.getDocumentInformation(Integer.toString(infoObject.getID()), retrieveMustFillInfo, boActions, null, null);
                m_Token = documentInformation.getDocumentReference();
            } catch (Exception ex) {
                System.out.println(GetWSError(ex));
                return;
            if (documentInformation.getMustFillPrompts()) {
                PromptInfo[] promptInfoS = documentInformation.getPromptInfoArray();
                for (PromptInfo promptInfo : promptInfoS) {
                    System.out.println(String.format("Prompt '%1$s', hasLOV=%2$s", promptInfo.getName(), (promptInfo.getHasLOV() ? "Yes" : "No")));
                    if (promptInfo.getHasLOV()) {
                        LOV boLOV = promptInfo.getLOV();
                        for (Value boLOVValue : boLOV.getValuesArray()) {
                            System.out.println(String.format(" LOV item '%1$s' RowIndex=%2$s", boLOVValue.getColumnsArray(0), (boLOV.getRowIndexed() ? boLOVValue.getRowIndex() : "")));
                    System.out.println("--End LOV");
                    PromptInfo[] promptInfoS2 = promptInfo.getPromptToBeFilledArray();
                    if (promptInfoS2.length > 0) {
                        PromptInfo promptInfo2 = promptInfoS2[0];
                        System.out.println(String.format(" linked to %1$s", promptInfo2.getName()));
                        if (promptInfo2.getHasLOV()) {
                            LOV boLOV2 = promptInfo2.getLOV();
                            for (Value boLOVValue : boLOV2.getValuesArray()) {
                                System.out.println(String.format(" LOV item '%1$s' RowIndex=%2$s", boLOVValue.getColumnsArray(0), (boLOV2.getRowIndexed() ? boLOVValue.getRowIndex() : "")));
                            System.out.println("--End LOV");
    Result
    Prompt 'Enter value(s) for City:', hasLOV=Yes
    --End LOV
    linked to Enter value for Country of origin
    LOV item 'Australia' RowIndex=6
    LOV item 'France' RowIndex=2
    LOV item 'Germany' RowIndex=4
    LOV item 'Holland' RowIndex=7
    LOV item 'Japan' RowIndex=5
    LOV item 'UK' RowIndex=3
    LOV item 'US' RowIndex=1
    --End LOV

    Hi,
    Refer SAP Note 1278947. You would require a Service Market Place logon to access this article.
    Let me know if this helps.
    Regards,
    Shreyans Surana

  • How to have cascading lov for a single column in tabular form

    Hi,
    How to have a cascading lov for a single column in tabular form
    ie i have one employee name column
    in tabular form if v pressed add row then one row ll be added
    In my scenario based on first row value
    the second row value to be displayed
    To achieve this what i have to do ..
    Regards,
    Pavan

    READ Cascading select list on tabular form  and
    Oracle APEX 4.0: Cascading LOVs/Select Lists | Inside Oracle APEX by Patrick Wolf BLOG
    helps you,
    Pars.

  • Cascade LOV in Apex 4.0

    Hello Apex Fun
    how can i make cascade list of value in Apex 4.0 ? i tried cascade which enabled in list of item properties but contain problems , please help me
    also when use that cascade the Arabic characters shown unclear ..
    Edited by: Moh Loay on Aug 24, 2010 2:46 PM

    Hi Moh Loay,
    I think you have to help me with that one, because I tried to reproduce that on apex.oracle.com and was not able to.
    1) I have created page http://apex.oracle.com/pls/apex/f?p=47158:22 which is a cascading LOV on the tables DEPARTMENTS and EMPLOYEES.
    2) For Department "Construction" I modified some of the employees to contain arabic and chinese characters
    3) I executed above page
    4) Changed the department to "Construction" which refreshed the employees select list
    5) Opened the Employees select list and everything shows up as I have entered it.
    Can you please verify with the above page that it looks good for you as well. Maybe it's an operating system/browser issue?
    If the above test case works for you, can you please create a test case with your failing data on apex.oracle.com so that I can have a look what's actually wrong. After you have done that, please provide the workspace, user and password so that I can access your application.
    Thanks
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins

  • Creating a Cascading LOV in an Interactive Report

    version 4.1.1.00.23
    Hello,
    Would someone help me with creating a Cascading LOV in an Interactive Report?
    I'm not finding much help searching Google or the forum.
    Thanks,
    Joe

    I used this example but I cant show picture in my region using this procedure. It displays simbol for broken image. Any help. I even added grants for procedure, but it just does't work. This is how I call procedure in html region:<img src="#OWNER#.display_thumb?p_photo_id=3084374128401555434" />

  • Cascading LOVs in a report region

    Can you create a cascading LOV in a report region? All of the examples I find are in a HTML region.

    Swosh,
    I think that this approach is better than the one from Vikas:
    http://htmldb.oracle.com/pls/otn/f?p=31517:176
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Cascading LoVs in Apex 4 based on a shuttle box

    I've set up cascading LoVs based on a shuttle box. When values are moved to the right-hand side of the shuttle box, the cascaded LoV items have their existing values cleared.
    Is this a bug? Is there a fix or a workaround?

    Hi again,
    I made an unconditional process, sequence 1, but the only
    thing working is the :P11_message is filled.
    BEGIN
    htp.prn('<script>alert(''Two is more then one'', Ok)</script>');
    htp.prn('<script language="JavaScript" type="text/javascript">alert(''TEST'')</script>');
    htp.p('<script>alert(''Two is more then one'', Ok)</script>');
    htp.p('<script language="JavaScript" type="text/javascript">alert(''TEST'')</script>');
    htp.p ('javascript:confirmDelete(htmldb_delete_message,''TEST'');');
    htp.prn ('javascript:confirmDelete(htmldb_delete_message,''TEST'');');
    htp.print ('javascript:confirmDelete(htmldb_delete_message,''TEST'');');
    htp.p('TEST');
    :P11_MESSAGE := 'TEST';
    end;
    Does any one have more suggestions.
    Hugo

  • Cascading lovs in Jdeveloper  R2

    on Jdev R2.
    I was doing several different Test with Jdev R2 regarding to cascading Lov and lovs components.
    here are results.
    lets split them in two flavors.
    I. Forms.
    a) cascading lovs works fine only if you use : input text item with lovs. (this one works fine even if you do not set autosubmit on the master and partial trigger on dependent lovs, .......cool)
    b) if you choose selectOneChoise, "what is really nice for short list" it does not work. not even if you set autosubmit and partial trigger.
    II. af:table
    a) on editing mode: editAll
    * using input text with lov works (you do not need to set autosubmit/partial triggers) but every time when you select a value from a list, an ugly error araise saying : field1 is required. field2 is required...to all require attributes (you can work after click)
    * using selectOneChoise did not work. after you select the first lov the next lov is surrounded by red square and never get refreshed.
    b) on editing mode: clickToEdit :
    this is really cool and fast, but cascading lovs does not work at all. not even input text with lovs
    has anybody any feedback/workaround/idea on this one, or should we wait until these bug get fixed, hopefully in the new release.
    also I was wondering what is the best approuch to execute some java code on load/unload.?
    thank you for any help.
    Luis

    to call java on load use af:clientlistener along with af:serverlistener.. use the type as load
    http://blogs.oracle.com/jdevotnharvest/entry/how-to_call_server_side_java_from_javascript
    or use the beforephase and afterphase property of f:view, refer navaneeth code here
    popup on page load using managed bean, using jdev-11.4
    use af:document's onunload property for unloading event and java calls

Maybe you are looking for

  • If U R Trying To Copy Music From Your iPod To Your iTunes Read This First!

    If you need to copy music from your ipod to your itunes in your computer becuse all your music was erased, try this first. Go to http://www.copypod.net/ try the 14 day free trial, i use this and it works wonderfully, because my pc crashed and lost ev

  • Mass Printing Sequence with Broadcasting with SN 2004s

    Hi, We are currently running on BW 3.5 and our customer has specific requirements in terms of printing. the printed layout off course must be good, which will be improved with the latest version of broadcasting. But on top of this, they have requirem

  • T:inputFileUpload inside t:panelTabbedPane - is it possible?

    Please, help anybody who can on the following issue: I need upload feature within form that has tabs. For upload to work properly form must have enctype="multipart/form-data" set. But tab panel container implicitly generates form itself and I found n

  • Strange error when start cube viewer

    Dear all, i have been installed the BIBdemo succesfully, and run the cube viewer, after that i create a cube on my schema and (by creating a collection from owb9.2 and executing it directly in the db from birdge,after that the cube viewer didn't work

  • TextArea link inside a move clip

    The actionscript calls textArea to have a rollover action and then link to another site when released. However when placed inside a movie clip the rollOver works but not the link. I need someone to tell me what syntax I'm missing. It's gotta be possi