Multiple values in select box

Hi,
I am trying to create a select box, where if the user chooses
option "all" several variables are passed as a list to be used in a
IN statement in my query. Doesnt seem to be working though, I think
it's something to do with comma seperating the list but I can't
seem to get it right.
Any help much appreciated. Thanks. Code Below
<select name="Faculty">
<option value="BS,CC,EI,HE,HH,ID,RS">All</option>
<option>BS</option>
<option>CC</option>
<option>EI</option>
<option>HE</option>
<option>HH</option>
<option>ID</option>
<option>RS</option>
</select>
and then the query is:
select count([06Student]) as stucount, domicileDesc
from tbl_StudentRecord, tbl_People, LUtbl_Domicile,
LUtbl_FeeStatus, IMPtbl_Programmes
where tbl_StudentRecord.[06PersonNo] = tbl_People.PersonNo
and tbl_People.Domicile = LUtbl_Domicile.DomicileCode
and tbl_StudentRecord.[06FeeStatus] =
LUtbl_FeeStatus.FeeStatus
and tbl_StudentRecord.[06Programme] =
IMPtbl_Programmes.Programme
and Faculty in ('#url.fac#')
and Domicile > '599'
and Domicile < '900'
and [06Programme] <> 'IDEPS'
and (ReturntoHesa = 'Y' or ReturnToHesa is null)
and [06StudentModuleStatusPAT] ='ST'
Group by DomicileDesc
ORDER BY count([06Student]) DESC

Faculty in ('#url.fac#')
This is not going to do what you want it to do. First of all
is there a
typo? Here you refer to "url.fac", but in the select snippet
the field
is named "Faculty" These would need to agree.
Even then this will return a result like this:
Faculty in ('BS,CC,EI,HE,HH,ID,RS')
What you need is this:
Faculty in ('BS','CC','EI','HE','HH','ID','RS')
The listQualify() and related functions can help you in this.
But what I usually do is this in the <cfquery ...> tag.
This way you do
not need to maintain a list of all parameters as your data
may change.
<cfif url.faculity NEQ "ALL")
AND Faculty = '#url.faculty#'
</cfif>

Similar Messages

  • Selecting Multiples Values from Multiselect Box

    Hi
    Here is my requirement ,
    Multiselect List Box should display Simulator_Type Values
    Simulator_Type Values           Values to search for in the column simulator type
    AC - small signal                              AC
    HB - Carrier                                    HB
    SP - Linear Noise                            SP - L
    SP - s parameters                           SP - s
    TR - Transient                               TR
    DC - operational point                     DC
    ET - Envelope Transient                  ET
    SSNA                                           SSNA
    [nothing]                                      nilDepending on the values selected in the multiselect values the data has to be dipayed where the value is in the simulator type column
    For Eg : AC - small signal is selected in the :p1_simulator_type multiselect box, The data where the word AC is in simulator_type column should display
    Examples of data in the simulator_Type column:
    SIMULATOR_TYPE
    ac, dcOp, Periodic Steady-pss
    AC - small signal
    AC Small Signal, Operating Point, Periodic Steady
    AC - small signal, SSNA
    DC - operational point
    ET - Envelope Transient
    So , here if i select AC - small signal from the multiselect list box , then the data where "AC" is there in simulator_type has to be displayed , in this case the data associated with
    ac, dcOp, Periodic Steady-pss
    AC - small signal
    AC Small Signal, Operating Point, Periodic Steady
    AC - small signal, SSNA
    has to be displayed...
    currently i have the report query below which is working but only when one simulator type is selected ....
    select
    * from   DW_RFA_JOBDATA
    where  RFA_SUBMIT_TIME >= :P1_START_DATE
    and RFA_SUBMIT_TIME < :P1_END_DATE    
    AND RFA_SIMULATOR_TYPE like '%'||:P1_SIMULATOR_TYPE||'%'Could any body please let me know how do i get data when multiple values are selected...
    Please let me know any further explanation is needed for the question
    Thank you
    Edited by: priyapinky on May 5, 2010 9:26 PM
    Edited by: priyapinky on May 5, 2010 9:54 PM
    Edited by: priyapinky on May 6, 2010 8:48 AM

    Hello,
    It seems to me like you don’t really understand how multi select items work in APEX. This type of items (we are talking about multi-select list, checkbox and the shuttle item) don’t really returned multiple values. They returned a single value that contains multiple segments, each include one valid option. By default, each segment is delimited with a colon (:). In your case it means that if you chose two values from your static LOV, the returned value will look similar to “HB:DC” (or any other combination of options). Now you need to work with this value.
    The way your RFA_SIMULATOR_TYPE column build, you can’t really work with the multi-select value, as you’ll never find a match to it, as this is actually an artificial value that only exist as a result of your multi-select.
    Regarding the new query you are trying, you wrote yourself that “i am getting the data with all the simulator_type select”, and that is correct. Where in this query you are using your filter (:P1_SIMULATOR_TYPE)? This is not the way to go.
    You need to break the compound value returned by your multi-select items, and work individually with each segment. You can do that in two ways. The simple one, as I already suggested, is to add another column that will contain only the code describing the simulator (similar to the returned value of the static LOV). In this case, using the instr() function you are checking if the column value is included in your filter (it’s a revered angle – you are actually checking if the single column value is included in your filter and not if the filter included in your column).
    The second option is a bit more complicated and it involves slicing the filter itself and dynamically build your query, using the “SQL Query (PL/SQL function body returning SQL query)” report option. In this case we are going to use the APEX built-in function APEX_UTIL.STRING_TO_TABLE(). The following is a very simple code example that you’ll need to adapt to your scenario:
    declare
      q      varchar2(4000);
      filter APEX_APPLICATION_GLOBAL.VC_ARR2;
    begin
      q := 'select * from emp where ';
      filter := apex_util.string_to_table('10:20');
      for i in 1..filter.count loop
        if i = 1 then
          q := q || 'deptno = ' || filter(i);
        else
          q := q || 'or deptno = ' || filter(i);
        end if;
      end loop;
      return q;
    end;In your case the parameter for the string_to_table is your filter item, and you can use LIKE as your comparison operator.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Forthcoming book about APEX: Oracle Application Express 3.2 – The Essentials and More

  • How to capture the multiple value in list box

    Hi forums,
           How to select the multiple values in list box and how to catch that values in OnInputProcessing.
    Regards,
    Ravi.

    Hi,
    A possible method is:
    Get all fields of the form
        CALL METHOD request->get_form_fields
          CHANGING
            fields = table_fields.
    loop over the fields
        LOOP AT table_fields INTO wa_fields.
    test the name of the field
          CASE wa_fields-name.
            WHEN 'test'.
    retrieve the value of the field
              test = wa_fields-value.
    endcase
    endloop.
    Eddy

  • How to get peoplepicker multiple value in text box?

    Hi All,
    How to get multiple selection people-picker value into text box while using InfoPath?
    Thanks in advance!

    Hi,
    According to your post, my understanding is that you wanted to get peoplepicker multiple value in text box.
    You can set the default value of the text box to:
    eval(eval(Person, 'concat(pc:DisplayName, "; ")'), "..")
    Or change XPath (advanced) to
    xdMath:Eval(xdMath:Eval(../my:group/pc:Person, 'concat(pc:DisplayName, "; ")'), "..")
    More information:
    Use Person/Group Picker in Infopath form to send multiple contacts to a SharePoint Workflow
    InfoPath Forms – Show Person/Group Picker Values in Text Box
    InfoPath Reference to Undeclared Namespace Prefix: ‘PC’
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Multiple values are selected in a multiselect prompt then we can get indivi

    Hi Experts,
    Can it be possible in OBIEE that if multiple values are selected in a multiselect prompt then we can get individual graph for each selected values?
    For eg if in a multiselect prompt,values such as bangalore,pune,hyderbad etc are selected then the result in a report diosplays 3 graphs one for each state.
    Waiting for any work arounds on this.
    Regards
    Ashish

    hi Ashish,
    Pull the cities in Section's section of pivot table and construct the graph ,use is prompted filter on the city
    It should work
    thanks,
    Saichand.v

  • SetSelectedValue for multiple values in List Box

    Hi,
    I want to set the selectedValue for multiple values in the List Box. If i use setSelectedValue for all the values, it just highlights the last one.
    Can anyone tell me how do i highlight multiple values in the List Box?
    Scenario:
    I have one screen where the List Box and "Go" button is placed. When i select multiple values in the list box and hit "Go" it should display what i have selected in the List Box.
    Note: List Box is generated dynamically.
    Thanks,
    Naresh V

    setSelectedValue as the name indicates will set one value and in your case since you are using it multiple times it would pick the last value.
    When the user selects multiple values from the list box and clicks on Go you can capture those values in the controller for processing. What are you trying to achieve by resetting all the selected values on the same listbox ?

  • How to retreive mutiple values from select boxes in jsp

    <select name="indices" style="width:180" size="6">
                             <option value=F_ARCHIVEDATE> F_ARCHIVEDATE </option>           
                   <option value=F_DELETEDATE> F_DELETEDATE </option>           
                   <option value=F_DOCCLASSNUMBER> F_DOCCLASSNUMBER </option>           
                   <option value=F_DOCFORMAT> F_DOCFORMAT </option>           
                   <option value=F_DOCLOCATION> F_DOCLOCATION </option>           
                   <option value=F_DOCNUMBER> F_DOCNUMBER </option>           
                   <option value=F_DOCTYPE> F_DOCTYPE </option>           
                   <option value=F_ENTRYDATE> F_ENTRYDATE </option>           
                   <option value=F_PAGES> F_PAGES </option>           
                   <option value=F_RETENOFFSET> F_RETENOFFSET </option>           
                   <option value=date1> date1 </option>
    <option value=id> id </option>
    <option value=name> name </option>
              </select>..
    hi iam having a select box with above option values..when we submitt the page i want retreive all these option values in anohter jsp called retreive.jsp..how can i do that..i want to put all these values in array in that jsp page..
    regards,
    sam

    Hi
    In ur code u cant select multiple values. Alter ur code like this
    <select name="indices" style="width:180" size="6" multiple> // multiple added here
    <option value=F_ARCHIVEDATE> F_ARCHIVEDATE </option>
    <option value=F_DELETEDATE> F_DELETEDATE </option>
    <option value=F_DOCCLASSNUMBER> F_DOCCLASSNUMBER </option>
    <option value=F_DOCFORMAT> F_DOCFORMAT </option>
    <option value=F_DOCLOCATION> F_DOCLOCATION </option>
    <option value=F_DOCNUMBER> F_DOCNUMBER </option>
    <option value=F_DOCTYPE> F_DOCTYPE </option>
    <option value=F_ENTRYDATE> F_ENTRYDATE </option>
    <option value=F_PAGES> F_PAGES </option>
    <option value=F_RETENOFFSET> F_RETENOFFSET </option>
    <option value=date1> date1 </option>
    <option value=id> id </option>
    <option value=name> name </option>
    </select>..
    in retrieve.jsp write like this
    <% String[] mv =request.getParameterValues("indices"); %>
    <% for(int i=0; i<mv.length;i++)
    {     %>
    <br>
    <%= mv[i] %>
    <% }
    %>
    I hope it will satisfy u :)

  • Passing multiple values to select-option low by submit at one go from zpro.

    Hi all,
    I have a requirement pass descrete multiple values form my z-program to to select-option low on selction screen of standard SAP program using SUBMIT statment at one go.At the same time select-option high will be empty.I will be thankful if anybody can help me in this regard.
    Sandeep.

    Hi Check this link...on submitting programs
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db9d7535c111d1829f0000e829fbfe/frameset.htm
    here is the code . we are calling the same program....you can call any other program as well.
    REPORT  demo_program_submit_rep1.
    DATA number TYPE i.
    PARAMETERS      paramet(14) TYPE c.
    SELECT-OPTIONS  selecto FOR number.
    The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:
    REPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
    DATA: int TYPE i,
          rspar TYPE TABLE OF rsparams,
          wa_rspar LIKE LINE OF rspar.
    RANGES seltab FOR int.
    WRITE: 'Select a Selection!',
    SKIP.
    FORMAT HOTSPOT COLOR 5 INVERSE ON.
    WRITE: 'Selection 1',
         / 'Selection 2'.
    AT LINE-SELECTION.
      CASE sy-lilli.
        WHEN 4.
          seltab-sign = 'I'. seltab-option = 'BT'.
          seltab-low  = 1.   seltab-high   = 5.
          APPEND seltab.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH paramet eq 'Selection 1'
                          WITH selecto IN seltab
                          WITH selecto ne 3
                          AND RETURN.
        WHEN 5.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
          wa_rspar-low  = 14.  wa_rspar-high = 17.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
          wa_rspar-low  = 'Selection 2'.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
          wa_rspar-low  = 10.
          APPEND wa_rspar TO rspar.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH SELECTION-TABLE rspar
                          AND RETURN.
      ENDCASE.

  • How can i select multiple values form select list

    Hi ,
    I have created few items in a page and all items are Lov items and based on these items stacked charts will display. My requirement is I need to select multiple values form LOV's
    Eg: In Interactive report goto filter and select an item and expression as IN and select multiple items and i need to select multiple values like this.
    Please anybody help me how to get multiple values.
    I have one more doubt Can we have a Print preview option in APEX.
    I have to see print preview for stacked charts. is it possible?
    Regards
    Narender B

    HI ,
    Thank you for valuable information and looks good.but Here our client need to select multiple values.... for eg: Open IR report and click on Actions button --->select filter
    select any column , operator as IN and from expression select multiple items.
    I need to select multiple values in that way so, could you please guide me how can i achieve this.
    Regards
    Narender B

  • Multiple values in selection screen

    Hi all,
    I have this program with a selection screen. I used the select-options keyword for the vendor(lifnr).
    The output is fine if I give a 'from' and a 'to' value but if I select the dynamic selections icon for the vendor in the selction screen and give multiple values, its not working.
    Can u pls help?

    Hi Sushma,
       I doubt you are giving EQ in place of IN in Select statement.
      Ex : Select * from LFA1 where lifnr IN S_LIFNR.
    AND not Select * from LFA1 where lifnr EQ S_LIFNR.
    Regards,
    Leo

  • How to Display values in order when Multiple values are selected in the Parameter List

    <p>Hi</p><p>I have a report which runs on the parameter(SalesPersonName) selected.<br />Report has a group section where for each SalesPersonName we have different actions(Lead,Prospect,Active and so on) he had performed which is the basis for the group.</p><p>Now if i need multiple Value selection in the parameter,which i am able to acheive but the order in which it gets printed is not the right one.</p><p>I want intially all the actions performed by one sales person printed and then the second one should start.</p><p>Can any one help me in this aspect.</p><p>Thanks in advance</p>

    <p>If I understand your report structure correctly - you have one Grouping on Actions.  So could you not add another grouping on SalesPersonName above the Actions grouping that you currently have?</p><p>So the new structure would be:</p><p>G1 - SalesPersonName</p><p>G2 - Actions (current grouping you have)</p><p> </p><p>Whether or not you suppress or don&#39;t suppress the new grouping is your choice, but it will then force the ordering that you are asking about (assuming I understood) </p>

  • Sort variable values in selection box in BEx web report.

    Hello friends,
    In my BEx web report I have cal/month selection. When I do dropdown to select values it starts with 01/1960 and I have to click 10 times to get to 01/2006, 02/2006 and so forth.
    Is there a way to sort these values so I can get most current cal/month in first list?
    Thanks in advance.
    Regards,
    BJ

    I would consider changing the read mode for the dropdown box.  Are all of those dates actually relevant?  Check out the properties of the dropdown box in WAD. 
    Thanks,
    Jeff

  • Returning multiple values with SELECT FOR LOOP

    Oracle EE 11gR1
    PL/SQL
    OEL 5.8
    ===========
    Would like to know how to do the following?
    for x, y in (select name, street
    from employees
    where hire_date < sysdate - 100)
    loop
    In other words, is there a way to handle 2 (or more) values in a SELECT FOR LOOP structure? If not, then how to accomplish the same task.
    The above does not work of course. :-)
    Appreciate any and all advice.

    Yes, just have one name in your for loop and that becomes the equivalent of a table name and reference the columns as that name.column name
    for t in (select name, street
       from employees
      where hire_date < sysdate - 100)
    loop
      dbms_output.put_line('name = '||t.name);
      dbms_output.put_line('street = '||t.street);
    end loop;

  • Multiple values selection in Selector Component of Xcelsius

    I wanted to select Mutiple values in Selector Component?I dont want List Builder..I wanted to Select multiple values in Combo box or List box..
    Is there any way?
    Thanks in Advance..
    Mini

    Hi Mini,
    First of all check your version of Xcelsius ( open Xcelsius -> got to Help tab ->About Xcelsius check the version) if it is 5.3.3.0 then its ok...otherwise open the below link to download the HotFix-
    [https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm]
    the functionality is offered in latest Fix Pack only. After you install the fix, you will get an additional functionality of multiple series selection in Combo Box as well as in List Box.
    Add as many series as you want for  multiple value selection.
    Good Luck.

  • Search help multiple values selection problem

    Hello Friends,
    I am using FM f4_if_int_table_value_request FM to display multiple values on selection screen
    in AT-selection-screen on value request event.
    Multiple values are getting displayed perfectly .
    Then after that I am using DYNP_VALUES_UPDATE FM to return the values back to screen.
    But the problem is in the select-option field . It only picks the last value selected.
    I have a row:
    I EQ 'last value selected from F4 help screen''.
    Is there a way to update multiple rows in the select option selection screen field.
    Thanks.

    Hi Suhas,
    you may try the following:
    TABLES spfli.
    SELECT-OPTIONS: s_carrid FOR spfli-carrid.
    SELECTION-SCREEN: PUSHBUTTON /1(20) but1 USER-COMMAND carr.
    INITIALIZATION.
      but1 = 'Choose CARRID(s)'.
    AT SELECTION-SCREEN.
      CASE sy-ucomm.
        WHEN 'CARR'.
          TYPES: t_return_tab  TYPE ddshretval.
          TYPES: BEGIN OF ty_line,
            carrid   TYPE spfli-carrid,
            carrname TYPE scarr-carrname,
          END OF ty_line.
          DATA: it_list TYPE STANDARD TABLE OF ty_line,
                wa_return_tab TYPE t_return_tab,
                i_return_tab TYPE STANDARD TABLE OF t_return_tab,
                v_repid TYPE sy-repid,
                v_dynnr TYPE sy-dynnr.
          v_repid = sy-repid.
          v_dynnr = sy-dynnr.
          SELECT carrid carrname
          FROM scarr
          INTO TABLE it_list.
          IF sy-subrc = 0.
            CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
              EXPORTING
                retfield        = 'CARRID'
                dynpprog        = v_repid
                dynpnr          = v_dynnr
    *        dynprofield     = 'S_CARRID-LOW'
                value_org       = 'S'
                multiple_choice = 'X'
              TABLES
                value_tab       = it_list
                return_tab      = i_return_tab
              EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
            IF sy-subrc = 0.
              s_carrid-sign = 'I'.
              s_carrid-option = 'EQ'.
              LOOP AT i_return_tab INTO wa_return_tab.
                s_carrid-low = wa_return_tab-fieldval.
                APPEND s_carrid.
              ENDLOOP.
              READ TABLE s_carrid INDEX 1.
            ENDIF.
          ENDIF.
      ENDCASE.
    What I have done is:
    - not linking the result of the F4 search to field S_CARRID-LOW
    - inserting this F4 search into event AT SELECTION SCREEN. This allows to see the select-options filled when its contents are actually populated.
    I hope this helps. Kind regards,
    Alvaro

Maybe you are looking for

  • Did you know that HP has a channel on YouTube?

    Did you know HP has a YouTube channel containing various videos covering common questions and PC tasks?  This includes desktops, notebooks, and printers. The channel can be found here.  Under Browser videos, the right side of the page will have three

  • Cannot Save Mapping

    Hi, I just installed 1ogR2, and I get error when saving mapping. It say properties (Access Denied). It is installed on Vista with 10g DB also on Vista. I will appreciate if anyone has any answer to this. Regards

  • Fatal error installing bundle (MSI)

    I have an MSI file that I built using Admin Studio for Zenworks. I am on ZCM 10.3.3 Running the MSI by itself it works without issue, but if I try to run that bundle from Zenworks, I get a fatal error every time. I tried setting it up as a UNC path,

  • Why did I suddenly lose all of the album artwork on my iPad

    Why did I suddenly lose all of the album artwork on my iPad

  • Netflix playing TV show problem

    I'm having a problem playing tv shows on my iPad in that when a tv show finishes I can't play the next episode without going to my computer (or blu ray Netflix player) to queue up the next episode. I have tried the refresh icon at the top and that do