Question of LOV cascading

Hi all

I have a table that contains the data of students, with columns for the dorm, sports, racing section, floor living room and advise among others. I've implemented a LOV this list each of these columns, so the LOV is defined as:

Display return value of value
Advisor 1
Section 2 of the FYE
University residence 3
University residence floor 4
5 sport

Now I want to set up a second LOV that lists the different values depending on which value is selected in the first LOV. So if counsel is selected, each Member of the faculty who is a counselor would be listed in the second LOV. If the Sport is selected in the first LOV, a list of all sports (Football, Baseball, Volleyball, etc.) would be listed in the second LOV.

I tried the following to the second LOV, but it gives an error:

IF: P8_GROUP = "1" THEN
RETURN
"select distinct sect of wlwrap where the sect is not null order by 1';
ELSIF: P8_GROUP = "2" THEN
RETURN
"select distinct sport of wlwrap where the sport is not null order by 1';
END IF;

The error is: error during rendering of the element on the page P8_SUB_GROUP. ORA-20001: the query must begin with SELECT or WITH (P8_SUB_GROUP is the name of the element that uses the second LOV)

Thoughts?

Thank you

Bob

Published by: wisers on 17 April 2013 15:43

Hi, wisers

What version do you use? If it is 4 or higher, you can set the Cascading LOV article Parent (s) with: P8_GROUP in your second LOV and put in place of Page to submit items with the same value. After that, you must create a query like this:
code here
Select a separate sect
of wlwrap
When the sect is not null
and: P8_GROUP = 1
Union
Select distinct sport
of wlwrap
where the sport is not null
and: P8_GROUP = 2
order by 1;

I'm sorry if I do not use the tag for the code properly: P...

Tags: Database

Similar Questions

  • Q: problem LOV cascading APEX 4.1.1 DB 11.2.0.3

    Hello
    I have a form with two LOVs (region and country) and I try to get the country LOV change when I select a region. What happens is that I can choose a region, but no country appear (there is a small circular thing that gets displayed for one second, but the LOV country is never updated).

    That's what I did and I read the docs, and it seems that I made the right choice. I created 2 LOVs:

    LOV_REGION
    select region_name d, region_id r
    from region
    order by 1
    The example data:
    REGION_ID       7
    REGION_NAME     APAC
    LOV_COUNTRY:
    select c.country_name d, c.country_id r
    from  country c
    where c.region_id = :P3_REGION
    order by 1
    The example data:
    COUNTRY_ID      284
    COUNTRY_NAME    Australia
    REGION_ID       7
    On a page, I have two questions (list selection both of them):

    P3_REGION:
    -Named LOV: LOV_REGION
    -View the Null value
    -Opportunity source: only when current session value is null
    -Static assignment

    P3_COUNTRY:
    -Named LOV: LOV_COUNTRY
    -View the Null value
    -Articles of Parent LOV cascading: P3_REGION
    -Opportunity source: only when current session value is null
    -Static assignment

    To see that I'm sane, I followed the example here: http://docs.oracle.com/cd/E23903_01/doc/ doc.41 /e21674/bldapp_item.htm #HTMDB05014. On the same page. But no luck because it does not work either.

    Any ideas what I'm doing wrong, I hope that I just need more RedBull and a crash course by reading the documentation?

    update of the following

    Page items to submit P3_REGION

  • Bug LOV cascading?

    Hi all...

    Please help with this question.
    Not sure this is a bug or browser problem.

    APEX: 4.1
    Browser: IE 7
    Database: 11g

    If I have a lov cascading, and if I have a bit of javascript
    under the HTML FORM ELEMENTS ATTRIBUTES '"onchange ="alert ('hi');" » »

    Fires the event on change twice.

    why he shoots twice onchange?

    Please check the following application.

    http://Apex.Oracle.com/pls/Apex/f?p=41803:2

    Select a Department, you will get 2 alert messages.

    Y at - it a fix for this?

    Checked Firefox and Safari on Mac and I only get the alert once on two of these browsers. Sounds like a problem with IE. Surprise, surprise...

    Earl

  • Error LOV cascading on click of a button

    Hello
    I've implemented a LOVs 4 cascading in an app that fills in the correct data from the previous items. My problem is when I click on the search button to complete the registration data on the basis of the 4 values LOV cascading select list lose focus, they reduce to a minimum with no data. Someone at - he never experienced this and knows how to solve this problem? My list of Select cascading use processes of Application and JavaScript to fill in the values. I also use some methods of Application and Javascript based on research, the buttons back and forward to complete searchable data based on the value selected in the LOVs cascade. Help or knowledge is really enjoyed this question. I don't know if it an error in syntax or in the Select list is not searchable form using APEX values. I also have an example in any wants to take a look at the about, thanks again.

    Charles:

    The function "f_query_by_example" JS lent items with a tagname of "SELECT". I changed the line

    If (l_El.tagName == 'INPUT') {}

    to be

    If (l_El.tagName == 'INPUT' | l_El.tagName == 'SELECT') {}

    Good selection lists appear now.

    CITY

  • lov cascading does not

    I show no result for the next lov cascading. Can someone help me understand why? The p437_a_type field will be filled by a static lov. (99-1-agency 2-Department 3-division 4-section admin.)
    My second love will tear out of different select statements based on the value of the first lov. I tried to use a case statement, then went with a union State then decided to ask for help when neither one worked.

    I have a process application called CASCADING_SELECT_LIST1 with the following process:
    BEGIN
    OWA_UTIL.mime_header ("text/xml", FALSE);
    HTP.p ('Cache-Control: non-cache');
    HTP.p ('Pragma: non-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ("< select >");
    HTP.prn ("< option value ="' | 1 |) "" ' > ' | ' - all roles - ""
    || "< / option >".
    );

    FOR c IN (SELECT, Ruy)
    (SELECT '- no roles -' d, r 0
    OF the double
    where: cascading_selectlist_item_1 = 99
    UNION SELECT agency_name d, agency_id r
    OF the Agency
    WHERE: cascading_selectlist_item_1 = 1
    UNION select D_DEPT_NAME d, D_DEPT_ID r
    of the DEPARTMENT
    WHERE: cascading_selectlist_item_1 = 2
    UNION select d_div_name d, d_div_id r
    the Division
    WHERE: cascading_selectlist_item_1 = 3
    UNION select s_sec_name d, s_id r
    Article
    WHERE: cascading_selectlist_item_1 = 4)
    )
    LOOP
    HTP.prn ("< option value ="' | c.r |) '">' || c.d | ("< / option >");
    END LOOP;

    HTP.prn ("< / select >");
    END;

    I have a named item application: CASCADING_SELECTLIST_ITEM_1

    In my form my header javascript form is the following: < script >
    function get_select_list_xml1 (pThis, pSelect) {}
    var l_Return = null;
    var l_Select = html_GetElement (pSelect);
    get var = new htmldb_Get (null, html_GetElement('pFlowId').value,
    = CASCADING_SELECT_LIST1', 0);
    Get.Add ('CASCADING_SELECTLIST_ITEM_1', pThis.value);
    gReturn = get.get ('XML');
    If (gReturn & & l_Select) {}
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for (var i = 0; i < 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;
    }

    function appendToSelect (pSelect, pValue, pContent) {}
    var l_Opt = document.createElement ("option");
    l_Opt.value = pValue;
    {if (document. All)}
    pSelect.options.add (l_Opt);
    l_Opt.innerText = pContent;
    } else {}
    l_Opt.appendChild (document.createTextNode (pContent));
    pSelect.appendChild (l_Opt);
    }

    }
    < /script >
    My P437 - static type lov def is: Admin; 99, agency 1, Department 2, Division; 3, section; 4
    My lov def P437-A-Number is:
    R & d, SELECT
    Of
    (SELECT '- no roles -' d, r 0
    OF the double
    where: P437_A_TYPE = 99
    UNION SELECT agency_name d, agency_id r
    OF the Agency
    WHERE: P437_A_TYPE = 1
    UNION select D_DEPT_NAME d, D_DEPT_ID r
    of the DEPARTMENT
    WHERE: P437_A_TYPE = 2
    UNION select d_div_name d, d_div_id r
    the Division
    WHERE: P437_A_TYPE = 3
    UNION select s_sec_name d, s_id r
    Article
    WHERE: P437_A_TYPE = 4)
    ORDER BY 1

    Any help will be greatly appreciated.

    Published by: ethel on May 20, 2009 08:38

    Published by: ethel on May 20, 2009 10:50

    Published by: ethel on May 20, 2009 12:11

    Published by: ethel on May 20, 2009 12:14

    Hi Andy,.

    I hope you are well.

    I have a question about it.

    Is the name of the Application element must be identical to the variable binding in code enforcement process?
    In this case is the following

    Code of the ODP

    FOR c IN (SELECT d, r
    FROM (SELECT '-No Roles- ' d, 0 r
    FROM dual
    where :CASCADING_SELECTLIST_ITEM_1 = 99
    UNION SELECT agency_name d, agency_id r
    FROM agency
    WHERE :CASCADING_SELECTLIST_ITEM_1 = 1
    

    and the name of the application must be CASCADING_SELECTLIST_ITEM_1

    I ask this because I thought that the javascript is simply passing the value of the element of the ODP and not the name of the element.

    Before thanks for your insight.

    See you soon,.
    Joel

  • LOV cascade with two items of parents (one might be hidden)

    Hello

    I have a LOV cascade which depends on two elements of parents, who works as expected. When two parent elements have values then the LOV cascading is populated with the appropriate values.

    I have the following situation, if. The elements of two parents are not always visible. According to an another page element (e.g. product code), one or the other Parent may be hidden (using JavaScript).

    The list of values for the LOV cascading is dynamic, so that part is ok

    if PARENT_ITEM_01 is hidden then  
       return 'select product_descr display, product_code ret from products where product_cat_02 = ' || :PARENT_ITEM_02 || ''';  
    elsif PARENT_ITEM_02 is hidden then  
       return 'select product_descr display, product_code ret from products where product_cat_01 = ' || :PARENT_ITEM_01 || ''';  
    else  
       return 'select product_descr display, product_code ret from products where product_cat_01 = ' || :PARENT_ITEM_01 || ' and product_cat02 = ' || :PARENT_ITEM_02 || ''';  
    end if; 
    

    Is there some sort of workaround to parent of the items but one of them may be hidden?

    Teo

    I have finally found a workaround.

    I created a dynamic action and that page_item was hidden I put this element with a default value and the works of lov cascading.

  • Hide child element LOV cascading


    Hi all

    I have two selection lists set up in cascade LOV s, using the point of LOV cascading parameters.  Selects a Select1 element updates Select2 with child options available.  It works very well.

    What I also want to do, is to hide the Select2 element when no options are available. I guess I can use a dynamic action to hide/show the item, but I can't work on how to get a number of available options and hide/show when it is required. Should be simple but good?

    The apex is 4.2.5.00.08

    Thank you!

    ~ L

    OK think I worked this one, if will post it here for other peoples reference.

    Create a single dynamic action:

    Event: change

    Type: element

    Articles: List of child selection

    Condition: Expression of Javascript

    Value: this.triggeringElement.length - 1 > 0 (counting of list entries,-1 for a display null value)

    Real Action: The child show selection list

    False Action: Hide the child selection list

  • Turn off validation for LOVs cascading messages

    Hello

    I created LOVs cascade (input text with a list of values) by calling af:query. When a value is entered in the function LOV (say Subclass) without entering a value in the LOV(say Class) Parent, I get an error message "Invalid Value". Is it possible to disable these error messages?

    Thank you
    KK

    Published by: 842704 on July 21, 2012 19:51

    you use this type of snippet
    http://jobinesh.blogspot.com/2011/03/retrieving-viewcriteria-from-custom.html

    or can u paste what you do?

  • LOV cascading

    Hello

    I use apex 4.1.1. and I have 3 + LOVs cascade (selection list) on my page. All these selection lists are in the window of the modal dialog box. When I open this modal dialog box in edit mode, I need selection lists of complete filling with the correct value of the DB (ajax call). When I change the value of the first selection list, that I call $('_#selectlist1').change () function, so the selection lists depended should full fill with correct LOVs. I want to change the list of the second selection to the right value of DB (I use $('#selectlist2').val ("new value"), but because the function $('#selectlist1').change () call is asynchronous, second selection list is not options still ($('#selectlist1').change () function is not yet finished) and $('#selectlist2').val ("new value") of the command runs without any efect.)

    Is there a way how it is possible to register the callback function to funtion includeMergeSourceInfo? Or another solution?

    Thanks for help.

    KIAS

    Hi Kias,

    setTimeout isn't reliable because you never know how long will take the request. Instead, I suggest to use the event 'apexafterrefresh' that you can use on a selection list to fill in the field when it has been updated with the data. I think that the following code should work.

    apex.jQuery("#selectlist3").bind("apexafterrefresh", function(){ $s('selectlist3', json.ROWSET[0].POJ_POJISTOVNA) });
    

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • LOV cascading in tabular form

    Hi guys,.

    I have read many articles on the generation of LOV cascading in a tabular presentation, but have not been able to make it work

    I created an example in my apex workspace at:

    http://Apex.Oracle.com/pls/Apex/f?p=4000:1500
    XXAPPS workspace
    Name of guest user
    Password demo
    App no 17551
    Page 2

    In my test scenario, I have a table emp, dept and a desk.

    In my tabular form (based on the emp table), I have a column deptno and a column of office.

    Depending on what the user selects in the column deptno, I want the corresponding list of offices associated with this dept LOV to return to offices LOV.

    The structure of the table is

    EMP
    EMPNO
    ENAME
    JOB
    MGR
    HIREDATE
    SAL
    COMM
    DEPTNO
    OFFICE_ID

    DEPT
    DEPTNO
    DNAME
    LOC

    OFFICE
    OFFICE_ID
    OFFICE_NAME
    DEPTNO

    When the user selects a deptno in the LOV I would like that to control the values that are returned to the office of LOV.

    I used the blog post from Jari:
    http://dbswh.webhop.NET/dbswh/f?p=blog:read:0:article:2003800346210117

    but as you can see there is not enough work that LOV Office does not return anything.

    I'm fairly new new JavaScript and jQuery, so probably something wrong, because some steps are responsible for errors and are confusing me a bit for example step2 is causing the page to return to the white (I have commented the code in the example)

    Any help would be greatly appreciated.


    Thank you

    Edited by: Cashy March 7, 2012 04:05

    Hello

    See your sample now

    I have fix your dynamic action. You got some strange numbers start JavaScript.
    Also, you have used bad selectors for parent and child select list.

    I have also change the application process

    Kind regards
    Jari

  • How to display the icon hosted on LOVs cascading...?

    Hello

    I have an old theme and passed to APEX 4.0.2. I use the LOVs cascading that work properly. But the icon to update the LOVs does not appear.

    The space for the icon is inserted as long the LOV is up-to-date, which looks weird because the following move a little to the right and right when the LOV has been updated.

    Do I have to load the Image from somewhere... ?

    Thanks, Jürgen

    /i/Apex/Builder/loading16x16.gif

    is the one you're looking for...

    for example:

    http://Apex.Oracle.com/i/Apex/Builder/loading16x16.gif

    You can determine this Firebug, using the net tab will show what images during page loading etc.

  • Search using LOV cascade

    Hi all

    I'm unable to do a search using a LOV cascading,
    I have an option in the first selection list and then it is generated a list in the second selection list, where I also choose an option.
    Now when I press submit, I see the return value in my second select list and no results.
    I wrote a custom query to retrieve the results, and I also have other fields of research, which work perfectly.

    Anyone have any ideas on what I might hurt?
    Any help is appreciated.

    1st selection list (parent) is empty and then the child selection list displays only the return value

    suggests that select 1 is not registered in the session, while the second is saved, but the application does not set the value (probably because query that uses the parent selection list not returned no records). Check the session state (session in the developer toolbar in the foot buton) whenever the page is refreshed (submitted, reloaded, etc.).

  • How is sent after choosing the areas?
    You have a branch reset that one of these elements, or does this second selection a redirect (and has not set the first)

    If you are on 4 Apex, Cascading lov is built using ajax and you do not reload or submit the page when you are working with to parent-child LOV

  • using the same LOVs cascading on multiple pages

    Hello

    I use apex 4 and try to get the LOV cascading to work.

    need basically for LOV cascade like "RÉGION" and "CTY", which is used in many pages in the application

    Because it will be used in several pages, I tried to create the LOVs in the shared component
    with the LOV for 'REGION '.

    Select the REGION display_value, REGION_ID return_value
    of MR_REGION_LOOKUP
    order by 1

    and "CTY".

    Select CTRY display_value, CTRY_ID return_value
    of MR_CTRY_LOOKUP where MR_CTRY_LOOKUP. REGION_ID AS: P3_REGION_ID
    order by 1

    He worked on the P3, but I can't use the same shared component LOV in other pages, unless I have change the P3 in the binding variable: P3_REGION_ID to the new as page number: P5_REGION_ID.
    Is there a way to use a generic approach for the CTY LOVs, which will work on several page?

    The elements of level application perhaps?
    Or at least to use the wildcard to replace the P3 to work for all pages?



    Thanks in advance for all advice :)

    Concerning
    Kian coulibaly

    Not my preferred solution but how about something like this

    select CTRY display_value, CTRY_ID return_value
    from MR_CTRY_LOOKUP Where MR_CTRY_LOOKUP.REGION_ID LIKE v('P'||v('APP_PAGE_ID')||'_REGION_ID')
    order by 1
    

    Kofi

  • LOV cascading works not when the page is public

    Hello

    I have a LOV cascading in a tabular form that I built example Denes Kubicek
    http://Apex.Oracle.com/pls/OTN/f?p=31517:176:2702932664861989:

    Thanks to this wonderful examle, I could make my lov cascading.

    However when I do the public page, the second lov (which is based on the first) does not work.

    Inorder to debug I changed to get.get () get.get ('XML') and put an alert on it; to check if the string of the selection list is correctly returned by the application process - it returns null. The alert even returns the string from the selection list when I set the authentication on the page.

    Also I noticed that when the page is public the application (TAB_CASCADING_ITEM) item is not be filled with the value of the first selection list.
    No matter who has encountered the same problem?
    Appreciate any suggestions?

    Thank you
    Dippy

    One of the parameters in the htmldb_get is the page on which the process is running. You should change this to the current page or make public page 0 as well.

  • problem: lov cascading with the UNION query

    I have develoep my LOV cascade according to
    http://download.Oracle.com/otn_hosted_doc/JDeveloper/11/demos/ADFBC_Cascading_LOV/ADFBC_Cascading_LOV.html

    I choise contain LOV like (detriment - banks - employed)
    another a cascading contain information for (detriment or banks or employees) depeding on first LOV
    data for detriment, the banks and the employees split into 3 table so
    read only display for second LOV was:
    SELECT id, name, "DPT".
    of detriment
    Union
    SELECT id, name, "BNK".
    from banks

    I followed step above link, when I test the application in British Colombia, it ' good job, but when I test the jsp page, is not woking!
    What wrong with my application? its because the UNION? or I'm wrong steps?
    IAM using jdeveloper p4, ADF BC + ADC faces
    Published by: user652271 on August 25, 2008 05:03

    Published by: user652271 on August 25, 2008 05:29

    Hello

    I think that you need a partial refresh in jspx.

    See: LOV Cascading Update

    concerning
    Peter

Maybe you are looking for