Displaying region based on multiple selection list

Hi,
this is my scenario.
i had 3 drop down selection lists A, B, C. based on A and/or B, C is populated. and when i select one from C, i display a report regions.
i am able to achieve this, and when in the selection list C, I have a null value as "- All -"
so when i select "- All -" then the report region should not show anything.
so in my report region query this is what i gave
DECLARE
q varchar2(2000); --query
w varchar2(2000); --where clause
we varchar2(1) := 'N'; --where condition
BEGIN
q := 'SELECT * from SCCATCH';
IF :P1_STATION != 'NULL' THEN
w := 'COLLECTION = :P1_STATION';
we := 'Y';
END IF;
IF we = 'Y' THEN
q := q ||' WHERE '|| w ;
END IF;
RETURN q;
END;
where :P1_STATION is the item value of C.
now what is not working is when i select A, B then C is populated and whne i select C, the report region is displayed.
now when i go back and select A, B , then C is again populated with a different C list, but the report region still remains the same showing the previous result.
what i really want to do is. when i select list A,B and then C, report get displayed. and when i go back and change sleection in A,B and then obviously C gets changed, then the report region should not show anything untill i select one from C.
i understand that there is some basic things i need to do to fix this, but i am not able to fix this.
Can you help me please.
Thanks,
Philip.

user12943263 wrote:
HiPlease update your forum profile with a real handle instead of "user12943263".
I basically want to use the select below for my list but I do not know how to get the app and session no.
select list_desc, 'f?p='||get_app_id|| ':' || page_no||':' || get_session_id
from table_nameIn SQL use bind variable notation as described in the Understanding Substitution Strings section of the documentation:
select
  ,  'f?p=' || :app_id || ':' || page_no || ':' || :app_session
from
    ... Always consult the documentation before posting here.
Dynamic Actions, JavaScript, and all "P.Ranish" posts above are all irrelevant to your question.

Similar Messages

  • Diplaying region content based on multiple selection lists

    Hi,
    I have 3 select list on submit(P1A, P1B, P1C). And i have 3 report regions.
    now this is the scenario. the 3 select lists are on submit.
    the P1C is a dynamic list which shows contents based on the selection from P1A and/or P1B. so this is how my P1C LOV looks like
    SELECT DISTINCT COLLECTION d, COLLECTION v
    FROM viewvs
    WHERE (YEAR =   :P1A  OR  :P1A= '-1' )
    AND   (SEASON =  :P1B  OR  :P1B= '-1' )
    ORDER BY d i also have a 3 report regions which display result based on P1C selection.
    now when i select P1C then i am able to see the 3 regions. and when i go back and change P1A and/or P1B, then P1C changes output. and the 3 regions should not show any data unless i again select one from P1C but, the 3 regions still hold on to the previous data.
    what i am trying to say is, when the regions should display data only when P1C is selected, and when any of P1A or P1B is changed the regions should disappear and should not display any data, but instead the 3 regions show the previous data unless a new selection is done.
    How can i clear the report region when everytime a new value is selected from P1A and/or P1B.
    also the below is part of what i have entered in the report regions
    IF :P1C != 'NULL' THEN
    --DISPLAY THESE VALUES
    END IF;---------
    this is what i found the latest. whats happeneing is
    when i select listA, listB-- listC gets populated and when i select from listC based on that value which gets stored in session state, report regions get displayed
    but when i go back and change selection in listA, listB
    by default listC session value should go to NULL, and only after i make a new selection, then with this new session value for listC, the report regions get displayed.
    but when i checked the session value for listC, it still remains the same old value from the previous selection, because i haven't nade new selection and thats why the report regions are still showing the old result.
    so how can i remove this session value for listC after displaying the report results.
    Thanks,
    Philip.
    Message was edited by:
    [email protected]

    There is nothing wrong with your code, so I'd look elsewhere for the problem. Is this a direct copy of what you have on your page?
    :P1_COMBO1 in ('Option 1', 'Option 2')
    And
    :P1_COMBO2 = 'Option Combo 2'And the page item values are exactly as you have in the quoted strings? You might run the page in debug and confirm the page item values are exact.
    Edited by: Bob37 on Dec 6, 2011 2:18 PM

  • Filter report on multiple select lists dynamically

    Hello
    Can somebody tell me how to filter/refresh a interactive report based on multiple select lists?
    The select lists are created with apex_item.select_list_from_query, because I need to create them dynamically.

    do not post duplicate questions/posts when you already have {message:id=10453848}
    It doesn't make any sense

  • Setting current values in Multiple Select List in SQL Query based Report

    Hi,
    I have a report based on a sql query that contains a multiple select list. Unfortunately I cannot get the multiple select list to display the current values (p_value) correctly. I have created a page item, :p311_current_versions, that is set using a pre-header process and it returns a value with a colon delimited format e.g. '10.1.2.1.0:10.1.2.2.0'. Then this item is used in the sql query to set the current value (p_value) of the apex_item.select_list_from_query function. However when the table is displayed, instead of having two entries, 10.1.2.1.0 and 10.1.2.2.0 selected, it has an extra entry '10.1.2.1.0:10.1.2.2.0' selected.
    Here is my code:
    select distinct a.product, a.version from (
    select distinct
    apex_item.display_and_save(2,product)||apex_item.hidden(1,env_product_id) PRODUCT,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(3,decode(product, 'HTTP Server' , :p311_current_versions, version), 'SELECT distinct version d, version r FROM ebs_tech_stack where
    product ='''||PRODUCT||'''',
    decode(PRODUCT, 'HTTP Server' ,'multiple="multiple" style="width:170px"','style="width:170px"'),
    'NO') as version
    from ebs_environment_tech_stack
    where environment_id = :p311_umgebung_id) a order by a.product
    If anyone can help me figure out how to set the current values correctly I'd be really grateful!!
    Thanks in advance,
    Jean

    Jean,
    I don't think this is possible using the apex_item package. The select_list_from_query function accepts only a single value for the second parameter.
    Scott

  • How can i display Value in Report which i select from Multiple select list

    Dear All,
    i am using multiple select List in form with report page.
    When i create new Entry with select Multiple value in Multiple Select List then in report Value display me in below format
    my SQL Query are
    select NAME D, CODE R from  COUNTRY_MAS WHERE ACTIVE_FLG ='Y' order by NAME
    AS:AI:AG:AM these are return value .i want to display NAME in report .
    How can i do this ?
    Thanks
    Edited by: Vedant on Apr 25, 2012 11:14 PM

    Short answer, use the apex_util.string_to_table to convert to a table; then you can either iterate through the table to generate a string of names, or accomplish the same with a bulk operation.
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_util.htm#CHDFEEJD
    Encapsulate all this within a pl/sql function.

  • Select MULTIPLE default values for a multiple selection list box based on another field in Infopath 2010

    Hello there - Before I explain my issue, I would like to point out that I have reviewed some other discussions on selecting default values for multiple selection listbox. But my issue is specific and different, and not answered by any of the discussions
    I visited.
    I have a multiple selection list box (say for example all countries in the world as values), and I would like to pre-select or setup multiple default values (say five countries) based on some criteria that I query from MS SQL database table.
    I know we can go to Data | Default Values option to setup one or many default values for multiple selection list box. When I enter the default values manually this works. I also right click the field under the Multiple-Selection List Box group, then select
    Add another Value Below and set the Default Value for this field to setup multiple default values.
    However, if I reference a field (either an infopath field or a field from SQL database) I am not able to setup multiple default values. Infopath automatically selects the last field I selected for all instances and in the end I am able to see only one
    default value selected instead of many. How to fix this problem? Why would infopath allow multiple default values when we enter it manually but not when we reference some fields?
    Please let me know if you need more info. Appreciate your help.
    Thanks!

    Hi redhotc,
    According to your description, my understanding is that you want to set multiple default values for a multiple checkbox list in InfoPath form.
    I did a test with SQL database table. I set three default values for the checkbox list by adding three values field under the group field(Data->Default values), each value field is for a default value. Then publish it to my SharePoint site, everything
    was fine.Please have a try as the below link:
    http://www.bizsupportonline.net/infopath2010/pre-select-items-multiple-selection-list-box-infopath-2010.htm
    Note: if you are using SQL databse table, you may need to enable ‘Allow cross-domain data access for user form templates that use connection settings in a data connection file’ in CA. More information, please refer to:
    http://answers.flyppdevportal.com/categories/sharepoint2010/sharepoint2010customization.aspx?ID=418b9423-a96c-4e5e-91f9-6a1b010ebb69
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Multiple Select List does not Refresh with Dynamic Action

    All,
    Scenario:
    Using APEX 4.2.2, I have a Select List page item (P4_SPONSOR) set to allow multiple values which has a dynamic LOV to populate the list.  What I would like to do is highlight the display values based on another page item's value (P4_DRIVER_ID).  When I set the source of P4_SPONSOR to static text, such as a delimited string of 1:2:3:4, any display values where the return values are equal to the static text are highlighted when the page loads.
    Problem:
    The problem lies in trying to use a query as a source for P4_SPONSOR which is filtered based on the other page item, P4_DRIVER_ID.  For instance, my SQL Query (returning colon separated values) returns the same as the static text noted above.  In the query's WHERE clause, I specify that the driver's ID is equal to P4_DRIVER_ID:
    SELECT sponsor_id
    FROM sponsors_drivers_xref
    WHERE driver_id = :P4_DRIVER_ID;
    This, as I understand it, would necessitate a refresh of P4_SPONSOR whenever the value of P4_DRIVER_ID changes.  So, I have a Dynamic Action that does just that.  When executed on the page, I can see the P4_SPONSOR multiple select list actually refresh, but none of the display values become highlighted.
    Thoughts?
    Thanks,
    -Seth.

    Seth,
    A dynamic action refresh of your select list will refresh the list of values (this is what you are seeing), it will not refresh the value of the item itself.  In fact, it will remove any values that you had already selected.  To refresh the value you will need to add additional dynamic actions.
    Create another dynamic action with:
    Event: After Refresh
    Selection Type: Item(s)
    Item(s): P4_SPONSOR
    If this was a normal select list you could just create a Set Value action and use your query to set the value of the select list.  Since this is a multiple select list your will need to get your colon delimited value first and then use some javascript to set the values of your select list.
    Create an hidden page item name P4_SPONSOR_TEMP.
    Add a true action to your new dynamic action:
    Action: Set Value
    Set Type: SQL Statement
    SQL Statement:
    SELECT sponsor_id
    FROM sponsors_drivers_xref
    WHERE driver_id = :P4_DRIVER_ID;
    Page Items to Submit: P4_DRIVER_ID
    Selection Type: Item(s)
    Item(s): P4_SPONSOR_TEMP
    Add another true action to your new dynamic action:
    Action: Set Value
    Set Type: JavaScript Expression
    JavaScript Expression:
    $("#P4_SPONSOR_TEMP").val().split(":")
    Selection Type: Item(s)
    Item(s): P4_SPONSOR
    --Jeff

  • How can I have multiple-selection list box "select at least one checkbox" option active only when the section it's in is visible?

    Hi, I'm using SP13 and InfoPath2013.
    I created a custom form and published it to SP13 document library.  This form has many MSLB.  Depending on the checkboxes selected in the 1st MSLB, the other MSLB will either hide or show.  Each MSLB is in its own section.  The requirement
    is to have each MSLB to have at least one checkbox selected.  Well, the problem is that when that MSLB isnot checked in the 1st MSLB it is not visible and shouldn't require any checkbox to be selected.  However, the form can't get submitted instead
    an error dialog would pop up and ask user to make a selection for MSLB that is not even displayed.  Is there any way to fix this besides unchecking all MSLB to be not required at least one selection?  Thank you.

    Eric, 
    I follow your reply post here and still doesn't work.  I also noticed your screen shot of selecting a field is not the same as what I see in InfoPath 2013.  
    Here is what I did, 
    1.Check At least one selection required for
    these Multiple-selection List Boxes
    as you want .
    2.Create a Formatting  rule for the 2nd
    Multiple-selection List Box.
    3.Add a  Condition as below:
    4.  I get a validation error if I don't
    select at least one checkbox in the hidden MSLB control when submitting.
    I think I'm following all the steps correctly
    but please let me know if I'm not.

  • How to populate another page item based on cascading select lists?

    Oracle 10gXE
    APEX 3.2
    I've created cascading select lists based on the examples (using Javascript and AJAX) that i've seen on this forum. Thanks for help on that!
    Now that I have these LOV's being populated without needing to submit the page, how do I take the value that is presently in each LOV and concatenate them together to populate another page item? I'm trying to build the URL string that will execute an Oracle Report once the user clicks a button.
    Previously, when I had multiple Select Lists with a submit, the URL was being put together using an After Submit Computation that would set the value for an item (P26_REPORT_URL) on the page. Notice that a report parameter (i.e. parameter name and Select List value) is only included if the user has provided a value. The page item that holds these values is then referenced by a button for URL redirect. The URL Target for the button currently is: javascript:popupURL('&P26_REPORT_URL.'), but will not work at the moment because P26_REPORT_URL page item is not changing based on what is selected in the LOVs. Since I'm not submitting anything (do I need to?), how do I put together the values needed?
    Computation for P26_REPORT_URL:
    DECLARE
    l_param VARCHAR2(2000);
    BEGIN
    l_param := '&REPORTS_URL.&report=&P26_RPT_VIEW..rdf&desformat=&P26_DESFORMAT.&destype=cache';
    IF REPLACE(:P26_OLO_CODE,'%'||'null%',NULL) IS NOT NULL THEN
    l_param := l_param||'&p_olo_code=&P26_OLO_CODE.';
    END IF;
    IF REPLACE(:P26_BEG_DATE,'%'||'null%',NULL) IS NOT NULL THEN
    l_param := l_param||'&p_start_dt=&P26_BEG_DATE.';
    END IF;
    IF REPLACE(:P26_END_DATE,'%'||'null%',NULL) IS NOT NULL THEN
    l_param := l_param||'&p_end_dt=&P26_END_DATE.';
    END IF;
    IF REPLACE(:P26_ORG_CODE_2,'%'||'null%',NULL) IS NOT NULL THEN
    l_param := l_param||'&p_org_code=&P26_ORG_CODE_2.';
    END IF;
    IF REPLACE(:P26_FLAIR_ORG_2,'%'||'null%',NULL) IS NOT NULL THEN
    l_param := l_param||'&p_flair_org_code=&P26_FLAIR_ORG_2.';
    END IF;
    IF REPLACE(:P26_BUDGET_ENTITY_2,'%'||'null%',NULL) IS NOT NULL THEN
    l_param := l_param||'&p_agy_code=&P26_BUDGET_ENTITY_2.';
    END IF;
    RETURN l_param;
    END;

    Andy,
    This is a great suggestion! After I posted, I started looking at a Javascript solution and figured it's probably what I had to do.
    However, now the cascading select list no longer working for some reason after I added the function to concatenate the item values. When I remove the showReport() function the select list works again.
    Here is what I have in the HTML Header portion of the page:
    <script language="JavaScript" type="text/javascript">
    function popupURL (url) {
      w = open(url,"winLov","resizable=1,width=800,height=600");
      if (w.opener == null)
      w.opener = self;
      w.focus();
    function showReport()
      var l_param = '&REPORTS_URL.&report=' + $v('P26_RPT_VIEW') + '.rdf&desformat=' + $v('P26_DESFORMAT') + '&destype=cache';
      if ($v('P26_OLO_CODE' != '')
       l_param += '&p_olo_code=' + $v('P26_OLO_CODE');
      if ($v('P26_ORG_CODE_3' != '')
       l_param += '&p_org_code=' + $v('P26_ORG_CODE_3');
      popupURL(l_param);
      function get_AJAX_SELECT_XML(pThis,pSelect){  
         var l_Return = null; 
         var l_Select = $x(pSelect); 
         var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=ORG_SELECT_LIST',0); 
         get.add('TEMPORARY_ITEM',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>

  • Multiple selection list and passing that value to oracle reports

    Hi
    I need to create a multiple selection list and then based on use selection, I need to pass that value to oracle reports. Can any one help with steps on how I can do this. Thanks

    Hi
    Concatenate the multiple values into a string separated by comma and then pass that string to report as a parameter.
    In report query, you have to use the lexical parameter using ' & '
    regards
    SD

  • Inserting multiple rows into a table using a multiple-select list

    I'm trying to figure out how to take the output of a multiple-select list (":" separated list of values) and use that to update a table by inserting multiple rows based on the values. Is there a straight-forward way to do that in APEX?
    Thanks.
    Chris

    Hi Chris,
    I think this should give you what you need: Working with a Multiple Select List Item
    --Jennifer                                                                                                                                                                                                                                                                                                                                                                                                   

  • Multiple-Selection List Box Values in Multiple Columns

    I am using InfoPath 2010 with SharePoint 2013. I have a form with a multiple-selection list box which has A LOT of choices. Instead of displaying all the choices in one column, is it possible to display the values of my list box in several
    columns? 

    Hi Andrea,
    I agree with Brij, one multiple-selection list box is associated with one list field, we cannot use the one multiple selection list box value for other multiple selection list boxes, we need to create multiple choices for each multiple-selection list box
    control in InfoPath form.
    Thanks
    Daniel Yang
    TechNet Community Support

  • Set focus on item that selected in multiple-selection list box field in infopath

    Hi
    I have  multiple-selection list box field in infopath that have for example 40 items. (I customize sharepoint list with infopath),then
     publish infopath form in to sharepoint list. users want to add new item,when they selected or checked each item in multiple selection list box, after that automatically control focus on first item, but I want to focus remain on that item
    I was selected. Why this happen?! I also set postback settings to “never” in multiple-selection list box properties. But didn’t work.
    Thanks.

    Hi,
    According to your post, my understanding is that you wanted  to find several columns based on user selection of checkboxes in one of the Multiple-selection List Box.
    I recommend to customize the form to concatenate values from choice field (with multiple values) into single line text box, and then hide the fields based on the text box value.
    We can follow the steps as following:
    Add a text box control(filed 3) on the form to hold the value selection in the multiple selection list box.
    Set the default value for the text box control as
    substring-after(eval(eval(Value, 'concat(., ";")'), ".."), ";")
    (you need to change the ‘Value’ in the formula to your multiple selection list box name: filed1).
    Add the conditional formatting on the flied: flied 3 does not contain value (you need to change the ‘Value’ in the formula to your multiple selection list box value.).
    In addition, you can add Formatting action to hide the text box control.
    Here are the result screenshots for you to take a look at:
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Multiple Select List Box default value ysing Fx or Code

    Hello,
    If anybody could help me in figuring out how to set default or customized values (checked) for a multiple select list box in infopath based on a values in a secondary data connection using the fx function or code, instead of manually typing in text in the
    default value function, it would be really helpful. Have been stuck for eternity in this 
    I have a temp table now which has each student name and the subject separtely
    something like this 
    Student Name       Subject  
    AA                              
    English
    AA                              Maths
    So that in my infopath form if I choose a student name in a drop
    down box the multiple selection list box has the values of the subject chosen by the student checked

    Hi,
    Please check the link below and see if it can meet your requirement:
    http://basquang.wordpress.com/2010/03/29/cascading-drop-down-list-in-sharepoint-2010-using-infopath-2010/
    Here is the design for your scenario:
    List1 for subject name
    List2 for student and subject (just as your temp table)
    Then you could create cascading drop-down in InfoPath form.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Checked some items of multiple-selection list box when form loaded in infopath

    Hi
    I customize sharepoint list with infopath. I have multiple-selection list box and want to checked some items of that automatically when form loaded. how can do this?
    Thanks.

    Hi,
    According to your description, my understanding is that you want to pre-select some items in the Multiple-Selection List Box.
    I recommend to follow the steps below to achieve this goal:
    Click Default Values under Data tab in InfoPath, expand the dataFields and navigate to the Multiple-Selection List Box field.
    Set the Default Value of the Multiple-Selection List Box field.
    Right click the field under the Multiple-Selection List Box group, then select Add another Value Below and set the Default Value for this field.
    Repeat step3 based on the number of the items that you want to be pre-selected.
    More information are provided in the link below:
    http://www.bizsupportonline.net/infopath2010/pre-select-items-multiple-selection-list-box-infopath-2010.htm
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

Maybe you are looking for

  • Two Apple ID Accounts, One Computer

    I am in charge of our districts 28 iPads.  I set up one Apple ID account for the iPads and want to sync all the same apps to all 28 iPads.  I also have an Apple ID account for my personal use.  When I go to iTunes and log off my personal Apple ID acc

  • Facing data type error when changing the order of fields in a query

    Hello Experts I am working on E sourcing 5.1. I have a query with some filters . I want to change the position of a particular filter. Basically I want to move a filter of type date to the top , so that it is the 1st parameter. I was able to do this

  • Swing text personalization - mnemonics problem

    hi everybody! I'm writing a program that needs multilanguage support, and thus I'm also resetting the swing properties to change the texts in buttons, dialogs and so on. I'm doing it by this kind of code: UIManager.put("FileChooser.openButtonText","o

  • Filling temporary table with two other tables.

    Hi everyone, In an start routine, I would like to do the following : read values in an internal table, save it in temporary table tab1. read values in an internal table (the same with a different request) and save it in temporary table tab2. save wit

  • N73 - update problem

    I have my N73 for two and a half years now, it never has been updated for newest version of software's now, when I wanted to, I was unable. the version of my device is V 4.0736.3.2.1 and the latest version is V 4.0839.42.0.1. the problem is, when I a