Handling cascading LOV (multi-Select parantes LOV)

Hello

I use LOV cascade.

P1_PARENT - Parent LOV (i.e. multiple selection)
P1_CHILD - child LOV

LOV Parent being multiple selection, so it will have the following values... P1_PARENT = AA:BB:CC

and where clause in the LOV cascading should be like
       where col1 in (:P1_PARENT)
   
-How to convert the element value for P1_PARENT of AA:BB:CC to "AA", "BB", "CC"
- Is there an another way manage in cascade LOV (to select several parent LOV).

Select the list of P1_CHILD
 
    select d, r
  from test
 where col1 = :P1_PARENT
 where col1 in (:P1_PARENT)
Thank you
Deepak

Hi Deepak,

In where clause for the LOV child, you can use instr function as:

(instr(':'||:P1_PARENT||':',':'||col1||':',1) > 0 ) 

To access the individual elements in the multiple selection: P1_PARENT, you can use:

DECLARE

l_selected HTMLDB_APPLICATION_GLOBAL.VC_ARR2;

BEGIN

  l_selected := HTMLDB_UTIL.STRING_TO_TABLE(:P1_PARENT);
  FOR i IN 1..l_selected.count
  LOOP
        //  your code here...access individual elements using  l_selected(i)
  END LOOP;

END;

Thank you
Rohit

Tags: Database

Similar Questions

  • How do the default editing a selection list after a change in another list of selection is made (not in cascade LOV).

    Hello

    I searched for the answer for a while now, but could not find a solution to my problem. It's a rather trivial issue, but after dealing with more urgent problems, I stuck with it and I can't move forward I use Apex 4.2.1

    OK, lets start with a description.

    I have two selection lists. After making a choice in the first, I would like to than the second value to change. It is not cascade LOV case, however, at least I don't.

    Let me give you an example. Suppose we have a table with name and default to the occupation.

    Name By default occupancy
    JohnDoctor
    MarkFirefighter
    GeorgeFirefighter
    TomConcierge

    End user first selects the name in the first list, then the occupation of another. It's perhaps not clearly in the example given, but the order of the questions.

    What I want is to force a change in the second value in the list after a choice in the first. So after the name is chosen, the occupation should switch to the default.

    The assignment is the most typical, but not the only one. So I want the end user to be able to change the occupation if necessary. Tom of sense is not to be janiotor, it can be whoever he wants this is why it is not cascade LOV problem.

    I tried with dynamic action - definition of value and then refresh. It works when the second selection list is the text field. I can't find a way to make it work with another selection list.

    Hope you can help.

    Concerning

    AEMs salvation,

    What I wanted with display and return value, you usually have a list of selection like this query:

    SELECT occupation d, occp_id r

    OF professions

    If your return value is an identifier. To use the text as return value is rather rare. Where my question, because obviously you must select the return value in your query, NOT the display value.

    So let me explain what is a set value. It takes the value of the server by using your query and AJAX in the background, then uses Javascript to set the value of the item in the browser.

    At this point your selection list still has the OLD value in the session. Then, you do a refresh and the element uses the old value, and it seems that nothing happens.

    So solution:

    -clear default values, you don't need those

    -get rid of refresh it in your DA

    Kind regards

    Joni

  • Loading list select cascade lov

    I have three selection list each with a parent lov cascade, except the first.

    1 - TOOL
    2 - CATEGORY
    2. - IN SUBCATEGORY

    Of these 3 elements of selection list... what I save is the "return value" of the subcategory, which is an identifier. If the problem appears when I try to change the information after I save it. I tried to extract the information in the "source type" box with an "sql return value" as well as the sector 'default value', but he did show errors when I want to create a new record... So I wonder if I can bring data with javascript or otherwise... Thank you

    Best regards, bernardo

    Hello Bernardo.

    the problem on your page 3 is that P3_CATEGORY is not automatically by a column of data. That's why when you view an existing record he won't show anything. And because the value is NULL, your 3rd LOV (P3_CATEGORY_ID) won't find something because P3_CATEGORY is null or an invalid value.

    You have two options:

    (1) add the CATEGORY in the database column to your table of PROBLEMS or
    (2) use a calculation or process to extract the CATEGORY based on your subcategory (P3_CATEGORY_ID) and fill P3_CATEGORY with this value. This calculation/process to trigger after the process of "fetch".

    See my calculation of example on page 3. In addition I also put P3_TOOL as "Page to go" for P3_CATEGORY_ID LOV, because you always have to specify all the columns that are used in the SQL statement 'Cascading LOV Parent éléments' or 'Page to present '.

    Hope that gives you a direction.

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

  • Apex 4.2.1 - mobile theme show and Cascading LOV bug

    I have install a test to the http://apex.oracle.com/pls/apex/f?p=35331 - name of user and password is test/test

    Simple page to show some problems in that I am running. Ask yourself if there are alternatives or if a patch would be available before that we live.

    First and second question are the same I think. -A normal text box (label1) seems well. But, Label2 is a single display element and Label3 is a part of the unalterable selection list. As you can see - the two values appear smack dab right next to the label and not in relation to the other fields. It is totally ugly and not usable as is. I tried to move it, but the label goes with it. I see no way to do it, but I was wondering if there is some hack I put in to solve...

    The last numbers is a LOV cascading. Simple table Installer. Static on the first, the second is a simple query that filters on the first. If you set the required value selection list and does not display null values - then when you click on the button of the second list - it just hangs. The page is unusable. I suspect it has to do with the value null or something. But - does not seem serious if something is chosen. Note: If the list is great - that I think and then uses a different UI control, that's fine. When one of the lists is small is only the question of breed.

    Solutions, workarounds or patches? Any ideas?

    Thank you

    Regarding your second bug with strange redirect, it's already something from that follow us

    bug # 16184694 - mobile jquery: select list of type multi selection triggers redirect after submit

    The bug can be misleading for your problem, but it's the same question. Looks like this is also fixed in jQuery Mobile 1.3.0. As for your other problem, it looks like that the rescue Mobile jQuery to use a dialog box, choose a value is bug. To work around the problem:

    Come in

    $(«_#wwvFlowForm_»,_apex.gPageContext$).attr ("data-ajax", false);

    in the attribute "run when Page Loads ' of the page that contains the item selection list page do not use an AJAX call to submit. Avoiding the trigger AJAX call a full page refresh which will also clean the call stack mobile jQuery.

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

  • Reuse cascading LOV in several pages?

    For example, if you page elements to make the car and identify the model, model car as element Parent LOV cascade so that every time the car has changed, the LOV for model would be updated. (Copied from documentation: P)

    Thus, the request for model car LOV is defined as

    select car_model d, car_model r
    from car_models
    where car_make=:CAR_MAKE
    
    

    And on the page, I establish a page CAR_MAKE and use it as the "Cascading LOV Parent article (s). So far so good.

    I want to use this LOV in another page. The problem is, APEX reject create me CAR_MAKE in another page, saying "name of the element is already used by another page or application.

    Addition of the LOV even for each page (only using linked different variable name), is there a solution?

    I thought to use a copy of the car to point application dynamic action game and referred to the point of Application in the LOV. Is it guaranteed that the dynamic action complete before the LOV is updated?

    Request Express 4.2.0.00.27

    Oracle 11g XE

    thtsang

    If the parent element names differ only in the number of page as in your example, you can use:

    select car_model d, car_model r
    from car_models
    where car_make=v('P'||:app_page_id||'_CAR_MAKE')
    

    Beware that you add the element relative to Cascading article (s) Parent LOV because apex generator won't recognize him.

    In this way, that you don't have to change the standard LOV when used on a new page.

    Nicolette

  • Double output on Cascade LOV

    Hi all.
    I spent 3 days of testing in this case, I have the script online at:

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

    I have 3 LOV:

    #1 is just ok
    #2 needs value between 1 # (returns a copy)
    #3 requires value of #2 (returns duplicate also)

    The user for the development is test/test123

    I really appreciate any help you give me.

    my version of the apex is 4.2 also

    Thank you!!

    Well, I agree, it was weird enough I just had to take a look. I saw fire ajax twice for very strange select statements.

    Snooping in your template page I noticed that you had commented on the #BOX_BODY tag #.

    
    

    #BOX_BODY # is mandatory, so I put back it. I think you could fool APEX because you had it on the page, but it was all inside of a comment.
    in any case... I do not fully understand why JS code that refreshes selects it was added twice to the page, but it's fixed now. :)

    Just make sure that you have your BOX_BODY tag in all your pages. Even if you don't want to use it. :)

    Oh and FYI, the elements need not be added to the Articles Page to submit because the list of element Parent of Cascade LOV already takes care of this.
    Assistance on the ground + "you can then use these page elements in the where clause of your SQL statement"list of values"". "+"

    Saludos,
    -Jorge

    Published by: jrimblas on May 9, 2013 22:46

  • Cascade LOV display text (based on LOV) report clasic

    Hi Experts,

    It is possible to use cascade LOV - item is displayed as text (based on LOV) in clasic report? (Display AS)
    I would like to refer to another column displayed in the report in LOV.

    Example:
    select description d,
           val_strg2 r
      from domain_cntr
     where cntr_name = 'CH_PRIM_ST_NOTE'
       and val_strg1   = #PRIM_STATUS#
       and active_idc  = 'Y'
    #PRIM_STATUS # is the column I would like to reference.

    Is this possible? IN THE CLASSIC REPORT

    concerning
    J :D

    Hello
    >
    Is this possible? IN THE CLASSIC REPORT
    >
    Yes.

    It can one thing long enough to encode, so be prepared for that.

    Here's how:
    a. use the APEX_ITEM API in your report query. Be sure to only specify the p_item_id parameter, using #ROWNUM #.
    b. in the LoV wrtie Parent a trigger of onChange event which triggers a JavaScript function and pass it the ID of the item.
    (c) in this JavaScript function makes a call to get AJAX < select >... < option... >... < / select >, in short the full HTML of the child LoV
    d. push this HTML fragment in the child Lov. You build the ID of the target based on the ID of the parent. E.g. f01_0001 to f02_0001.
    e. you can further keep the invisible or disabled child initially and then make it visible/enable after it is filled.

    Kind regards

  • In cascade LOVs (APEX 4.1) problem, using in the report does not define values

    Hello

    I use APEX 4.1.0.00.32 and I have a simple report as

    SQL :*

    SELECT * in the region
    Region WHERE the like '% "| P3_REGION | » %'
    and country like "%" | P3_COUNTRY | » %'
    and the city like '% "| P3_CITY | » %'

    Elements:*.

    P3_REGION:
    Select a separate region as d, r of the region of the region

    Display the Null value: YES
    Value null, display value: - Select -
    Return value of NULL: + 0 +.

    P3_COUNTRY:
    Select distinct country as d, r of the region of the country where region =: P3_REGION

    Display the Null value: YES
    Value null, display value: - Select -
    Return value of NULL: + 0 +.
    Cascading LOV Parent article (s): P3_REGION

    P3_CITY:
    + select distinct city, city as the region r, whose country =: P3_COUNTRY

    Display the Null value: YES
    Value null, display value: - Select -
    Return value of NULL: + 0 +.
    Cascading LOV Parent article (s): P3_COUNTRY


    The LOVs work very well and the correct values are displayed if cascade through them

    So, I want to the last step to filter the report with the values that were selected in the lovs. And that I does not.
    I tried to add a button with the SUBMISSION of the page. After choosing values in all the LOVs and by clicking on the button SUBMIT page supports, alle LOVs are disabled (with value - select-) and the report shows all lines.
    I tried to change the "redirecting to Page 3" button and setting the values P3_REGION, P3_COUNTRY, P3_CITY P3_REGION., P3_COUNTRY. & P3_CITY. but without success.
    I tried to use the 'Page Action time value' parameter to 'Validate' or 'redirect and set' for all the element LOVs or only the last element LOV, but then the cascade of the LOVs is not working properly and the report does not change.

    I am confused as I Don t know what I can do so far. I think this should be a condition easy limit/filter the report with the values in the LOVs.
    In addition, it should be possible to choose only the LOV region and then limit the report with this region (not select country and city)

    Thanks in advance!

    I had a problem similar to a previous version, fixed when I updated element Source value or Expression (the section of the Source) to himself.

    I mean:
    for the P3_REGION, defined as & P3_REGION element.
    for the P3_COUNTRY, defined as & P3_COUNTRY element.
    for the P3_CITY, defined as & P3_CITY element.

    It will be useful.

  • Apex 4 Cascading LOV s how to define a child LOV back to the null return value

    Hello

    My problem is that I use the new dynamic action to implement features of LOV cascading to the Apex 4 which means not having to submit the page to update child LOVs after parent LOV changes.

    What I find, is that when you change the value LOV parent, then the child LOV (which has a return value of zero) is not or by default in the return value zero (in my case no selection should return-1) if the list is filtered to a different set of values, which is not a selection valid. The LOV child is left without a choice when I need its default value to the return value zero (-1, which represents all values).

    Also, I expected to do before the page is sent and filtering to the bottom of the hierarchy of LOVs can work when the child is zero (-1, which means that all values) and in turn her child LOV (s) will also the child null filter.

    Any help would be appreciated.

    Thank you

    Hi 804641,

    I don't know if I get your problem and I tried to reproduce.

    http://Apex.Oracle.com/pls/Apex/f?p=2672:6 is my example with a LOV cascading where I also defined a dynamic action that is triggered when P6_EMPNO changes and it shows the current selection.

    Maybe it helps if install you an example on apex.oracle.com and provide space to work/user/pwd, so that I can have a look. I'm not sure about your sentence "help for a new dynamic to implement cascading LOV feature", because dynamic actions are not necessary for LOVs cascading. It is a characteristic of the types of items themselves where you just set the attribute "Cascading LOV Parent éléments".

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

  • Filtering table using Multi Select choice

    Hello gurus,

    I want to filter a table column that is inspired by LOV using list Multi choice to select the filter option.

    Can I filter the table by using the only choice by following below tutorial in the ADF Code corner:

    016 how to customize the filter ADF Faces Table

    Someone can provide any link or guide to implement Multi Select choice filtering list in the tables.


    Thank you
    Buxant

    Hello

    will tomorrow publish sample 98 ADF Code corner: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples

    Frank

  • Prevention of ListView, select the element for multi select

    How do you keep a user to select specific items during a statement select multi. You can use the MultiSelectHandler to do?

    I have essentially two types of elements. Setting caching and QUERIES.  When the user performs a Multi Select on a cached item... I want only their selection to other cached items.  Even if the user is running a Multi Select statement on an item not cached... I want only their selection of other items not cached.

    Is anyway to do this?  Been Googling for half an hour and can't find that everything about this use case.

    Since I use an element of custom list, I went to this subject a little differently. My CustomListItem implements a ListItemListener. I've implemented the select method as such.

    void CustomStandardListItem::select(bool select) {
        bb::cascades::ListItemListener* lil = static_cast(m_sli);
        bb::cascades::ListView * view = qobject_cast(this->parent());
    
        if (view->multiSelectHandler()->isActive()) {
            bool isCached = view->property("isMultiSelectTypeCached").toBool();
    
            if (m_cachedImageView->isVisible() && isCached) { // is cached.. allow selection of other cached objects only
                lil->select(select);
            }
            else if (!m_cachedImageView->isVisible() && !isCached) { // is not cached.. allow selection other cached objects only
                lil->select(select);
            }
        }
        else {
            lil->select(select);
        }
    }
    

    The dynamic property 'isMultiSelectTypeCached' is just a bool on ListView value that gets defined the type of ListItemComponent. It could have just as well been the type of ListItemComponent.

  • I need a box multi select drop-down list or list of selection with image or icon faclitliy

    Hello

    I tried to find a plugin or a jquery plugin that allows to perform the task of

    have a list of selection with images and there should be a facility such as multi select.

    How this can be accomplished. One have they implemented it in any of their application

    Any information will be greatly appreciated.

    Thank you

    pauljohny100 wrote:

    Hello

    I tried to find a plugin or a jquery plugin that allows to perform the task of

    have a list of selection with images and there should be a facility such as multi select.

    How this can be accomplished. One have they implemented it in any of their application

    Any information will be greatly appreciated.

    When ask questions user interface-related still State (at least) the full version of APEX, the theme and the version of browser compatibility / required.

    See the plugin jQuery Select2 , for which there is a plug in APEX .

    Pre-plugin when we have implemented requirements like this using a model report, CSS and personal...

  • Table multi-selection disabled the check boxes in ADF 10 g

    I think I met an obstacle when you work with a multi-selection table in 10 ADF.

    The selection itself works very well. However, my problem is to try to disable some of these boxes several selections. These boxes are disabled using the expression language. Once disabled, I can always choose these rows in the table using the button 'Select all' created by multiple selection facet. On the page sent, the disabled lines are not recognized as being selected, which is good. However, they always seem to be selected on the front-end server, which would be confusing for users.

    <af:table emptyText="No roles were found"
              binding="#{backing_userRoles.tableRoles}"
              id="tableRoles"
              value="#{backing_userRoles.userRoleList}"
              var="userRole">
                            <f:facet name="actions">
                              <af:commandButton text="Copy Roles"
                                                binding="#{backing_userRoles.cmdCopy}"
                                                id="cmdCopy"
                                                action="#{backing_userRoles.cmdCopy_action}"/>
                            </f:facet>
                            <f:facet name="selection">
                              <af:tableSelectMany text="Select items and ..."
                                                  binding="#{backing_userRoles.tableSelectMany1}"
                                                  id="tableSelectMany1"
                                                  rendered="#{backing_userRoles.managerFlag}"
                                                  disabled="#{userRole.role.autoGrantedFlag eq 'Y'}"/>
                            </f:facet>
    

    multiselecttable.PNG

    So as you can see, the disabled check box has been selected even when disabled. Any ideas on how to change this behavior? Or maybe just get rid of the default generated 'select all ' | 'Select none' orders?

    Thank you

    Cody

    Or, remove selection facet and make sure you have a selection logic - that is to say, some transient Boolean attribute of VO enabled/disabled state, and you have Select All/Select none

  • How multi select documents out for signature and remove them?

    During the test a form, I sent many forms for signature. Now they clutter the page manage. Is there a way multi SELECT and delete them without doing them one by one?

    Hello Balusha,

    From now on, we do not have bulk option remove documents on the tab manage in E-Sign. But, I probably took this as a feedback.

    Kind regards

    -Usman

  • How to compare 2 lists of box-multi-select/shuttle APEX (e.g.1:2:3 and 3:1:2) for equality?

    I want to validate 2 selections of list of shuttle for equality. for example

    1:2:5:7:18:3

    and

    1:5:7:2:3:18

    should be treated as equals and therefore valid (i.e. same selections but in different order)

    While

    1:2:5:7:18:3

    and

    1:2:18:9 are not equal and would fail validation.

    If I use the function string_to_table() on the two lists, then I need sort the associative arrays and then compare them for equality.  Any suggestions on the best way to do it?

    Thanks in advance

    PaulP

    Thanks for all help you, but I decided to stay with string_to_table APEX tables and keep things simple.  I decided to return Varchar2 ('TRUE', 'FALSE') instead of boolean (TRUE, FALSE) so I could use the function in a SQL WHERE clause.

    Here's my working solution

    create or replace FUNCTION CheckMultiSelectStringsEqual(
          p_string1    IN VARCHAR2 ,
          p_string2    IN VARCHAR2 ,
          p_separator IN VARCHAR2)
        RETURN varchar2
    ------------------------------------------------------------------------------------------------------------------
    -- This function accepts 2 multi-select/shuttle box strings in the format '1:2:3:5:12:4'
    -- and a string separator i.e.':' and irrespective of the order of individual selections within
    -- the string, returns 'TRUE' if the strings are equal else returns 'FALSE'.
    -----------------------------------------------------------------------------------------------------------------
      IS
        l_table1 apex_application_global.vc_arr2;
        l_table2 apex_application_global.vc_arr2;
        v_return varchar2(8);
      BEGIN
        if p_string1 is null or p_string2 is null or p_separator is null then
          raise_application_error(-20001,'USAGE: CheckMultiSelectStrings() function requires 2 not null strings and a separator character' );
        end if;
        l_table1 := apex_util.string_to_table(p_string1, p_separator);
        l_table2 := apex_util.string_to_table(p_string2, p_separator);
        if l_table1.count() <> l_table2.count() then
            return 'FALSE';
        end if;
        <>
        FOR i IN 1..l_table1.count() LOOP
            FOR j IN 1..l_table2.count() LOOP
               if l_table1(i)=l_table2(j) then
                 v_return:='TRUE';
                 continue OUTER_LOOP;
               else
                 v_return:= 'FALSE';
                 continue;
               end if;
            END LOOP; -- FOR j IN 1..l_table2...
            EXIT OUTER_LOOP WHEN v_return = 'FALSE';
        END LOOP; --FOR i IN 1..l_table1.
        RETURN v_return;
      END;
    

    -= == HERE IS THE TEST FOR THE FUNCTION CODE =.

    set serveroutput on
    declare
    v_return varchar2(8);
    begin
    v_return:= CheckMultiSelectStringsEqual('1:2:3:4','2:1:3:4',':');
          if v_return='TRUE' then
              dbms_output.put_line('Strings are equal');
          else
              dbms_output.put_line('Strings are NOT equal');
          end if;
    end;
    

    Hope this helps someone...

    PaulP

Maybe you are looking for

  • I have a HP pavilion DM4 M #1165dx

    my current internal Harddrive is maxed out 500 looking for a 2 GB to that has a life decent speed, found this on Amazon (Samsung Seagate tab portable disk HARD SATA III 2.5 inches of Bare dimm (ST2000LM003) internal drive) also have 4 GB RAM installe

  • Left side of the Satellite L500 13N keyboard does not respond

    A month ago I throw liquid on my computer laptop ¬ nothing happened at first, but 4 days ago, I noticed that the ESC, 1, Tab, CAPS LOCK, Q, and Z keys are unresponsive, do not work. In addition, to enable the LOCKING of the upper CASE with the WIndow

  • HP G60 laptop

    How can I find the product number or everything that I need to get a spare battery?

  • Table of the table cluster

    Examples of creating a table of a series of clusters?  There is an example for switching from a cluster table table. Thank you.

  • Griffin PowerDock charger

    Looks like output of this charger to a USB socket. Does anyone know if this can be plugged into a wall charger that can accept a USB (like one of these wall Chargers)? It is logical that it should work, I was wondering if Griffin has decided to do so