APEX 4.0.2 Multi-selection on a cascade LOV select list only pass 1 value

Hello everyone,
I am struggling to make a cascading LOV select list has multi-selection.
On one report page.
I have 2 select list
The first one lists the court name (P4_COURT_NAME), the second one (P4_DEFENDANT) list all defendants who currently engaged in the court.
The problem is when I allow the defendant select list become multi-select, when it submit it only pass the first selected value.
So I create just a simple select list based one list of value, and make it allow multi-selection. When it submit, the normal select list can pass selected values properly, while the cascade LOV select list pass only the first selected value.
Please help if any of you have an idea why.
We use APEX 4.0.2.00.07, Oracle data version iis 11g
The some configuration settings I set for the P4_DEFENDANT IS
Value required: Yes
Page Action When value changed: None
Allow Multi Selection: Yes
Named LOV: --Select Named LOV-
Display Extra value : Yes
Display Null Value: Yes
Null Display Value: --Select—
Null return value:
Cascading LOV Parents Items: P4_COURT_NAME
Page Items to Submit: P4_DEFENDANT
Optimize refresh: YES
List of value definition
SELECT def.first_name || ' ' || def.surname || ' (PRN: ' || def.prn || ' )' as d, def.def_id as r
FROM defendant def INNER JOIN court_engagement ce
  ON def.def_id = ce.defendant_id
WHERE (ce.date_joined_aodt_court IS NOT NULL
  AND (ce.date_terminated IS NULL OR to_date(ce.date_terminated,'dd/mm/yyyy') > to_date(sysdate,'dd/mm/yyyy'))
  AND UPPER(ce.court_name) LIKE UPPER(:P4_COURT_NAME)
  AND ce.active = 1)Source Used: Only when current value in session state is null
Source Type: Static Assignment
Maintain session state: Per session
The rest is default.
Thanks in advance.
Ann

Hi Chintan,
The "Source used" for those items are "Always, replacing any value in the session state". To set them to "Only when current value in session state null" sounds a good solution to me.
However, a strange thing just happened - now I will not lose the values of the items after the page reloading, although I have changed nothing in the page in my application since I asked the question. I don't understand why all of a sudden the reloading doesn't make me lose changed values any more. Let me dig it tomorrow to see what I'll find.
Thanks so much for your help.
Christine

Similar Messages

  • 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

  • APEX - passing values from LOV's or multi-select LOV's to another APEX form

    I am new APEX development and I need to take the values from LOV's and multi-select LOV's and pass them to another APEX form. I want to take those passed values and use them in the where clause of the base-table in the called form. Any assistance would be greately appreciated.

    Hi,
    Refer this example
    http://www.talkapex.com/2009/07/apex-how-to-pass-multiselect-list.html
    Example: http://apex.oracle.com/pls/otn/f?p=20195:2100
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • SSRS 2012: How to get a "Select All" that returns NULL instead of an actual list of all values from a multi-select parameter?

    I have a multi-select parameter that can have a list of thousands of entries. In general, the user will pick a few entries from the list or "Select All". If they check "Select All", I would much prefer that I get a NULL or an empty string
    instead of a list of all values. Is there any way to do that?
    In experimenting with a work-around, I tried putting an "All" label with a null value in the list, but it is ignored (does not display in the drop-down). If I use an empty string for the value, my "All" entry does get displayed, but so
    does "Select All", which is confusing. Is there a way to suppress "Select All"?
    - Mark

    I adapted the following from a workaround posted by JNeo on 4/16/2010 at 11:14 AM at
    http://connect.microsoft.com/SQLServer/feedback/details/249227/multi-value-select-all-parameter-in-reporting-services
    To get a null value instead of the full list of all values when "Select All" is chosen:
    1) Add a multi-value parameter "MyParam" that lists the values to choose.
    2) Add a DataSet "ParamCount" identical to the one used by "MyParam", except that it returns a single column named [Count] that is a COUNT(*) of the same data
    3) Add a parameter "MyParamCount", set it to hidden and internal, then set the default value to 'Get values from a query', choosing "ParamCount" for the Dataset and the one [Count] column for the Value field.
    4) Change the parameter for the main report DataSet so that instead of using [@MyParam], it uses this expression:
    =IIF(Parameters!MyParam.Count =
    Parameters!ParamCount.Value, Nothing, Join(Parameters!MyParam.Value, ","))

  • Multi color gradient for touch and selected color of spark mobile list

    multi color gradient for touch and selected color of spark mobile list
    how to get dat?

    or how about a bitmap as the background for the touch and selected color for the items in a list.

  • Multi-select lists, their return values and showing their display value

    I have a multi select list which is dynamic. The display and return values are pulled from a table where the return value is the Primary Key.
    When people select a few options, the value is stored in session state as 11:12:13 (etc...). From here, I run these numbers through a process which takes a report ID and the multi-select string, and saves individual rows as Report_id, individual multi select value until there are no more multi select values.
    This is great, they're tied in as a foreign key to the LOV lookup table, and they are easily search able.
    I have trouble where I want to list a report's entire multi-select list. I have a function combine the numbers with a : in between them and RTRIM the last one, so I have an identical string to what a multi-select table uses. 11:12:13 (etc..)
    When I assign it to display as an LOV in a report, it just shows the 11:12:13 instead of listing out the values.
    Single number entries, where someone only selected one option in a multi select, display fine.
    Am I doing this wrong?

    Scott - you're right on the money. I did this initially because I thought assigning an LOV display value to a report column would yield the results I wanted.
    I want to do this without referring to the original table... meaning I don't want a function to have to go out and get the names, I'd like my LOV assignment to do it. This saves headache of having to change something in 2 places if it ever changed.
    Am I not going to be able to do this?
    I created a test multi-LOV page, it doesn't work with original(not processed in my function) LOV assignments either, unless you only select one.

  • Handling cascading LOV (having Multi-Select parent LOV)

    Hi,
    I am using cascading LOV.
    P1_PARENT - Parent LOV (which is multi-select)
    P1_CHILD - Child LOV
    since Parent LOV is multi-select, so it will have the following vallues... P1_PARENT = AA:BB:CC
    and the where clause in the cascading LOV should be like
           where col1 in (:P1_PARENT)
       - So how to convert item value for P1_PARENT from AA:BB:CC to 'AA','BB','CC'
    - Is there is any other way to handle cascading LOV (for Multi-Select parent LOV).
    select list for P1_CHILD
        select d, r
      from test
    where col1 = :P1_PARENT
    where col1 in (:P1_PARENT) Thanks,
    Deepak

    Hi Deepak,
    In the where clause for the child LOV, you can use instr function as:
    (instr(':'||:P1_PARENT||':',':'||col1||':',1) > 0 ) To access the individual elements in the multi-select :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;Thanks,
    Rohit

  • Report -- filter with selection list -- show all values after select page

    Hello!
    I have the following problem:
    - I have a report
    - this report can be filtered with a selection-list
    - the selection list is based on dynamic LOV and has a null-value
    - I added the code of the report the following, to filter the report after choosing a value of the selection list:
    ... and (instr(type, decode(:P8_FILTER_type, '%null%',type,:P8_FILTER_type)) > 0)
    This works very well.
    But my problem is: When the user logs out and the next time, he logs in, the selection list shows " --- show all values --- " (my null-display-value) and the report is empty "no values found".
    ---> I want to show the first time, the page is selected ALL the values of the report. (this is now only possile if I press the button which belongs to the selection list)
    I hope, somebody understands my problem.
    Thank you so much,
    LISA

    Hello Lisa,
    The first time it's probably NULL.
    So what you can do in your where: (instr(type, decode(NVL(:P8_FILTER_type,'%null%'), '%null%',type,:P8_FILTER_type)) > 0)
    Off topic: I also wonder if that where clause can't be simpler? Do you rely need the instr?
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • 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

  • 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

  • Apex 4.2.1 - mobile theme display bugs and Cascading LOV bug

    I've setup a test at http://apex.oracle.com/pls/apex/f?p=35331 - username/password is test/test
    Simple page to show some issues I'm running into. Wondering if work-arounds exist or if a patch would be available before we'd go live.
    First and second issue are the same I believe. So - a normal text box (label1) looks fine. But, Label2 is a Display only item and Label3 is a read-only select list item. As you can see - both of the values appear smack dab right beside the label and not in line with the other fields. It's totally ugly and not usable as is. I've tried to move this over, but the label goes with it. I can see no way of doing it, but wondering if there's some hack I can put in to solve it...
    The last issues is with a cascading LOV. Simple table setup. Static on the first, the second a simple query that filters on the first. If you set the select list to Value Required and not to display null values - then when you click on the Second List button - it just hangs. The page is unusable. I suspect this has to do with the null or something. But - doesn't appear to matter if anything is chosen. Note - if the list is large - which I think then uses a different UI control, this is fine. Only when one of the lists is small does the issue reproduce.
    Any workarounds or fixes? Any ideas?
    Thanks

    Hi,
    I would suggest to not mix different questions and a thread for each of them. Makes it easier for others to follow.
    About your problem with the cascading LOVs, it appears that this is/was a bug in jQuery Mobile which we use under the hood. I was able to reproduce the problem with APEX 4.2.1 using jQM 1.2.0, but was not able to reproduce it with APEX 5.0 which will use jQM 1.3.0RC1 or higher. The problem occurs if a select list is empty.
    There are different workarounds available:
    1) set the attribute "HTML Form Element Attributes" of P1_CLOV_2 to data-native-menu="false"or
    2) set the attribute "Display Null Value" of P1_CLOV_2 to Yes and "Null Display Value" to - select - (or something similar). The "Value Required" = Yes will still guarantee that a value has to be picked. Having the extra null entry will guarantee that the select list always contains an entry, that seems to workaround the bug in jQuery Mobile.
    I have filed bug 16355963 - jquery mobile: empty select list causes javascript error
    to track that this is definitely fixed in APEX 5.0.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • My lov results into the return value instead of the display value in APEX

    Hi,
    For 1 of the columns I'm representing in APEX, I choose 'Display as text, based on a lov'. I'm using:
    select aan.id||', '||r.naam||', '||a.woonplaats d, aan.id r
    from wmo_aanvragen aan
    , wmo_dossiers d
    , wmo_relaties r
    , wmo_adressen a
    where d.avg_1_id = aan.id
    and d.rel_nummer = r.nummer
    and a.rel_nummer = r.nummer
    and a.id = (select min(e.id) from wmo_adressen e where e.REL_NUMMER = r.nummer
    and e.EIND_DATUM is null)
    and d.id = (select min(f.id) from wmo_dossiers f where f.AVG_1_ID = aan.id)
    But somehow it displays the 'aan.id' value instead of the display value. Does anyone know howcome?? In TOAD it works fine
    Niels
    Edited by: user6394263 on 10-apr-2009 1:22

    Hello Niels,
    Your LOV Displays your concatenated value, but returns the "aan.id" (into the Form field), just as expected. If you want to show the description on your Form, use a PopUp LOV - Displays Description Return Key value
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Select lists and deactivated values

    Consider the following simplified test case.
    1. create tables like this
    create table lov_values
      lov_pk number primary key
    , name varchar2(10)
    , active varchar2(1) not null
    insert into lov_values valeus ( 1, 'A', 'Y' );
    insert into lov_values valeus ( 2, 'B', 'Y' );
    insert into lov_values valeus ( 3, 'C', 'Y' );
    commit;
    create table trx
      trx_pk number not null primary key
    , lov_fk number not null foreign key references lov_values
    ) ;2. Create an APEX Insert/Update form on the trx table. Define the LOV_FK item as a select list with this query
    List of values definition:
      select name d, lov_pk r
      from   lov_values
      where  active = 'Y' ;
    Display Extra Values: Yes3. Users use the APEX form to create records like this:
      trx( trx_pk, lov_fk ) = ( 10, 1 )   -- users sees LOV_FK value as "A"
      trx( trx_pk, lov_fk ) = ( 20, 2 )   -- users sees LOV_FK value as "B"
      trx( trx_pk, lov_fk ) = ( 30, 3 )   -- users sees LOV_FK value as "C"4. A year later an admin deactivates lov_value 2/B by setting active to 'N'.
    5. When a user queries trx row 10 they still see "A".
    6. When a user queries trx row 20 they now see "2".
    7. When a user queries trx row 30 they still see "C".
    In step 6 I'd like the user to see "B" whenever they query old data with that value but I never want them to be able to create new trx rows with 2/B or update the LOV_FK value of existing rows to be 2/B. I'd also like to avoid using a pick list with a popup window just for selecting from a list of two (could be a few) values.
    Just wondering how others have dealt with this scenario in their APEX apps.

    I actually just found a simpler way in Select list filter in a tabular form problem forum thread. In the query that defines the tabular form I added a column called HIDDEN_FK_VALUE as follows.
    select
    "TRX_PK",
    "TRX_PK" TRX_PK_DISPLAY,
    "LOV_FK",
    APEX_UTIL.SAVEKEY_NUM("LOV_FK") hidden_fk_value
    from "#OWNER#"."TRX"Then I modified the the Select List query to look like this.
    SELECT name d, lov_pk r
    FROM lov_values
    WHERE (active = 'Y' OR lov_pk = APEX_UTIL.KEYVAL_NUM )Works like a charm. Thanks everyone for your input.

  • APEX 4: Cascading LOV generic?

    Is it possible to have a "generic" cascading LOV?
    I prefer to have my LOV as shared components (reuse and such) but with a cascading LOV the detail list refers to the Parent item within the query. This makes for a not very reusable LOV in my opinion.
    Is it possible to use a more generic bind?
    select description d, id r
    from   table
    where parent = :B --<--- Not refering to any particular Page Item
    order by 1... and specify the actual item which is to be used in the detail query? (Page Items to Submit)

    Hi Learco,
    I doubt that this will work, because the "Cascading LOV Parent Item" has to be a page item which is actually rendered into the HTML page. The reason is that for those page items we register a "change" event to trigger the refresh of the childs. If it's an application item it would not exist on the page.
    I would also question if dealing with additional application items and additional dynamic actions would make the code better maintainable. If the LOV query is really that complicated that it would be beneficial to re-use it, I would suggest to define a database view for it and then again use a very simple LOV statement to access it. I think that would make it much more transparent and maintainable then trying some generic bind variables and placeholders.
    Just my 2 cents
    Patrick
    PS: yes, nice colors ;-)
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Cascading LOVs (APEX 4.1) problem, using in report does not set values

    Hi,
    i am using APEX 4.1.0.00.32 and i have a simple report as
    SQL:*
    SELECT * from region
    WHERE region like '%'||P3_REGION||'%'
    and country like '%'||P3_COUNTRY||'%'
    and city like '%'||P3_CITY||'%'
    Items:*
    P3_REGION:
    select distinct region as d, region as r from region
    Display Null value: YES
    Null display value: - select -
    Null return value: +0+
    P3_COUNTRY:
    select distinct country as d, country as r from region where region = :P3_REGION
    Display Null value: YES
    Null display value: - select -
    Null return value: +0+
    Cascading LOV Parent Item(s): P3_REGION
    P3_CITY:
    +select distinct city as d, city as r from region where country = :P3_COUNTRY
    Display Null value: YES
    Null display value: - select -
    Null return value: +0+
    Cascading LOV Parent Item(s): P3_COUNTRY
    The LOVs work fine and the correct values are displayed if cascading through them
    So in the last step i want to filter the report with the values that were selected in the lovs. And this i get not working.
    I tried to add a button with SUBMIT of the page. After choosing values in all LOVs and clicking the SUBMIT button the page submits, alle LOVs are cleared (with value - select -) and the report shows all rows.
    I tried to change the button to "redirect to Page 3" and setting the values P3_REGION, P3_COUNTRY, P3_CITY to &P3_REGION., &P3_COUNTRY., &P3_CITY. but without success.
    I tried to use the setting "Page Action when Value Changed" to "Submit" and/or "Redirect and set value" for all Item LOVs and/or only the last item LOV, but then the cascade of the LOVs does not work properly and the report does not change too.
    I am confused as i don´t know what i can do until now. I think this should be an easy requirement to limit/filter the report with values in the LOVs.
    Furthermore it should be possible to choose only the region LOV and then limit the report with that region (without choosing country and city)
    Thanks in advance!

    Hi Dan,
    thank you for your answer. I have the solution now from Kleber_M, this works.
    Dan McGhan wrote:
    1. Use bind variables in my query. It would look something like:
    SELECT *
    FROM region
    WHERE region LIKE '%'|| :P3_REGION ||'%'
    AND country LIKE '%'|| :P3_COUNTRY ||'%'
    AND city LIKE '%'|| :P3_CITY ||'%'
    This was only a mistake when writing the post, i forgot the colon. I use bind variables of course.
    2. Make sure you have a comma separated list of item names that the report depends on beneath the SQL Query where it says Page Items to Submit. This will make sure that the value of those items on the page are bound into session state prior to the query executing.I tried this, too, but without success...
    3. Use Dynamic Actions to perform the refresh action when any of the three items changes. This would be both more performant and a better experience for the end user than a full page refresh.How can i do this. This sounds good, because when refreshing the page often some items oder actions are done that i don´t want to.
    Regards,
    Matze

Maybe you are looking for

  • Design a contact sheet my way somehow?

    I would like to be able to make a "contact sheet" for web posting. The print module lets me set the layout I want. Now I need to change the background to black, the type to white. Then I want to make a 72 dpi export for web posting. Can this be done?

  • Printing Photo with Info

    I have a couple of hundred photos in iPhoto 5 that I want to print. With each picture, I also want to print the title and creation date/time that is stored with the photo so I have a record of when the photo was taken. Can I do this with iPhoto? How?

  • MacBook MacBook Pro Software Update Version 1.1 won't install

    I choose install in software update, it downloads then logs out and installs. Next check for new updates it's still there.

  • Why can't I open video clips?

    When trying to play video clips on error message opens OSstatus -54 why?

  • Development Class for Dimension Tables

    I'm trying to change the development package for a dimension within our salecube. Right now its assigned to $TMP. I'm very familar with the basic steps to change this but its not there. The cube itself is assigned to a "z" package but not the dimensi