List boxes as filter

Hi,
I’m developing an asp page containing a form with two
dynamically populated list boxes and a submit button. The submit
button should open up another asp page with results filtered by
criteria determined by the contents of the 2 list boxes. I can
populate the list boxes OK but I am not sure about how to use the
selected values as the filter. Can anyone point me in the right
direction?
Thanks,
Chris

Select * WHERE IDFieldName <> Variable1 && / OR
IDFieldName <> Variable2
You can set your variables in the advanced section of your
recordset box.
Check your SQL as the above is just 'pseudo' (I alway shave
to check SQL,
for some reaons can never remember it quite right). The
recordset box will
help you to find the right way to access your variables -
URL/Form/Session,
etc.
HTH,
Jon
"Chris_HSL" <[email protected]> wrote in
message
news:e9o4r0$bbi$[email protected]..
> Hi,
>
> I?m developing an asp page containing a form with two
dynamically
> populated
> list boxes and a submit button. The submit button should
open up another
> asp
> page with results filtered by criteria determined by the
contents of the 2
> list
> boxes. I can populate the list boxes OK but I am not
sure about how to use
> the
> selected values as the filter. Can anyone point me in
the right direction?
>
> Thanks,
>
> Chris
>

Similar Messages

  • How Do I Filter a Report Using a Multi Select List Box and Specifying Date Between Begin Date and End Date

    Hope someone can help.  I have tried to find the best way to do this and can't seem to make sense of anything.  I'm using an Access 2013 Database and I have a report that is based on a query.  I've created a Report Criteria Form.  I
    need the user to be able to select multiple items in a list box and also to enter a Begin Date and End Date.  I then need my report to return only the records that meet all selected criteria.  It works fine with a ComboBox and 1 selection but can't
    get it to work with a List Box so they can select multiple items.  Any help is greatly appreciated while I still have hair left. 

    The query should return all records.
    Let's say you have the following controls on your report criteria form:
    txtStart: text box, formatted as a date.
    txtEnd: text box, formatted as a date.
    lbxMulti: multi-select list box.
    cmdOpenReport: command button used to open the report.
    The text boxes are used to filter the date/time field DateField, and the list box to filter the number field SomeField.
    The report to be opened is rptReport.
    The On Click event procedure for the command button could look like this:
    Private Sub cmdOpenReport_Click()
    Dim strWhere As String
    Dim strIn As String
    Dim varItm As Variant
    On Error GoTo ErrHandler
    If Not IsNull(Me.txtStart) Then
    strWhere = strWhere & " AND [DateField]>=#" & Format(Me.txtStart, "yyyy-mm-dd") & "#"
    End If
    If Not IsNull(Me.txtEnd) Then
    strWhere = strWhere & " AND [DateField]<=#" & Format(Me.txtEnd, "yyyy-mm-dd") & "#"
    End If
    For Each varItm In Me.lbxMulti.ItemsSelected
    strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
    Next varItm
    If strIn <> "" Then
    ' Remove initial comma
    strIn = Mid(strIn, 2)
    strWhere = strWhere & " AND [SomeField] In (" & strWhere & ")"
    End If
    If strWhere <> "" Then
    ' Remove initial " AND "
    strWhere = Mid(strWhere, 6)
    End If
    DoCmd.OpenReport ReportName:="rptMyReport", View:=acViewPreview, WhereCondition:=strWhere
    Exit Sub
    ErrHandler:
    If Err = 2501 Then
    ' Report cancelled - ignore
    Else
    MsgBox Err.Description, vbExclamation
    End If
    End Sub
    If SomeField is a text field instead of a number field, change the line
            strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
    to
            strIn = strIn & "," & Chr(34) & Me.lbxMulti.ItemData(varItm) & Chr(34)
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • How to read the selected value of a dropdown list box

    Hello,
    I have 2 custom fields which are of type dropdown list on Accounts(CRMM_ACCOUNT) PCUI application details tab.I need to read the selected value of first dropdown list item,based on that second dropdown list will be populated.
    I know where to populate the dropdown list box,it is in FILL_DROPDOWN_LISTBOX.
    I dont know how to trap the selection made on dropdown list.
    PLease guide me on how to trap the dropdown list field selection value.
    Thanks in advance.
    Thirumala.

    Hello,
    Check what is done in standard for the fielf REGION which is inked to the country.
    Otherwise, you can do the following :
    - in field group customizing, for field 1, flag the 'send request' flag. So, when you change the value in this field via the dropdown, the MAC methods are immediately called.
    - Put the new value in a global variable (GV).
    - in the fill_dropdown_listbox method, get the value from this GV and based on it, filter the values for the dropdown of field 2.
    Hope this will help you,
    Regards,
    Frederic

  • Scroll bar error in list box

    Hello all,
    I work for a company using BI 7.0.
    We provide reports in Bex Web 7.0 to our users. They requested us for a problem in list box of selection (or filter).
    for example the user wants to filter on a characteristic. This characteristic has multiple possible values.
    He chooses a value on the first page of the list box. then he wants to select an other value and uses the scroll bar. So he clicks in the gap of the scroll bar in order to go to the next page of values. It happens correctly but we figured out that doing so the new page wasn't exactly the exact next values available.
    Indeed for example the first page displays 10 values (from 1 to 10) so by clicking in the gap we should go to the 10 next values 11 to 20 but it is not what is happening because the displayed values are 13 to 22, so the values 11 and 12 were passed by the scroll bar and we need to do singles click on the scroll bar to display values 11 and 12.
    Does someone have an answer for this issue ?
    Thank you by advance.
    Jérémy

    Thank you for your answer Michael.
    I tried to apply the modification but there was no fix to my problem.
    Here are screenshots to explain my problem :
    Screen 1 = First page
    http://www.monsterup.com/image.php?url=upload/1264688014660.jpg
    Screen 2 = second page
    http://www.monsterup.com/image.php?url=upload/1264688015650.jpg
    Screen 3 = missigne values between fisrt and second page
    http://www.monsterup.com/image.php?url=upload/1264688015672.jpg
    Any other clue ?
    Thanks
    Jérémy

  • List Box values

    Hello,
    I’m using a WAD report with list box. When I filter the report the values are not changed in the list box. Is there a way that the user will see only the values which shown in the report?
    Please Advice,
    Amir

    Amir,
    Change the List Box property to "Posted Values"
    Arun
    Assign points if useful

  • Filtering values in a dropdown list box

    Hello Team
    In the BSP application CRM_IC, we want a drop down list box to be filled based on the entry selected from another dropdown list box. We have all the entries for the second drop down box in ABAP internal table .However, we do not want a server round trip to happend in doing so. Thus we have used the attribute 'Onclientselect' and we are trying to call a java script function call on this event to filter this ABAP internal table . In this function, we would like to fill the contents of the second dropdown list box after reading the contents of the first dropdown list box. Please advice us as to how this can be achieved. Basically, we observed that ABAP server side script is not executed in the java function.
    Thanks
    Rony

    Rony,
    I have used the following technique to synchronize the
    contents of two drop down list boxes.
    <b>Scenario:</b>
    The selection in listbox ddlbxSystemEquipNum, which I
    will call "A", determines the contents of listbox
    ddlbxModuleEquipNum, which I will call "B".
    I use a JavaScript array to shadow the ABAP internal
    table containing the possible values for listbox B.
    When the page is initially displayed, listbox B is
    populated from the ABAP internal table.
    When a new selection is made in listbox A, I use the
    onClientSelect event to call a JavaScript function,
    updateModuleList(), to update the contents of listbox B
    from the JavaScript shadow array based on the selected
    value in listbox A.
    <b>Code Excerpts:</b>
    <u>Declare the JavaScript shadow array and listbox B update function</u>
    <script language="javascript" type="text/javascript">
        var moduleArray = new Array();
        function updateModuleList() {
            var selSystem = frmNrg1100.ddlbxSystemEquipNum;
            var selModule = frmNrg1100.ddlbxModuleEquipNum;
            // Get selected system equipment number
            var selected_system =
                    selSystem.options[selSystem.selectedIndex].value;
            // Clear module select options
            selModule.options.length = 0;
            // Add module select options for the selected system
            var j = 0;
            for (var k = 0; k < moduleArray.length; k++) {
                if ( (selected_system == moduleArray[k].system) ||
                                         moduleArray[k].system == "") {
                    selModule.options[j++] = new Option(moduleArray[k].text,
                                   moduleArray[k].value,
                                   moduleArray[k].selected) ;
    </script>
    <u>Specify the onClientSelect event handler on list box A</u>
    <htmlb:dropdownListBox
        id = "ddlbxSystemEquipNum"
        width      = "400"
        onClientSelect = "updateModuleList()"
    <u>ABAP and JavaScript to populate internal table and shadow array of possible values for listbox B</u>
    <%
    loop...
            wa_module_options-system   = wa_customer_tool-equipment_num_t.
            wa_module_options-text     = tool_list_text.
            wa_module_options-value    = wa_customer_tool-equipment_num_m.
            wa_module_options-selected = selected.
            append wa_module_options to module_options.
    %>
    <script language="javascript" type="text/javascript">
        // Add all possible Module select options to a JavaScript array of objects
        moduleArray[moduleArray.length] = {  system:"<%=wa_module_options-system %>",
                                               text:"<%=wa_module_options-text %>",
                                              value:"<%=wa_module_options-value %>",
                                           selected:"<%=wa_module_options-selected %>" } ;
    </script>
    <%
    endloop.
    %>
    Hope this helps.
    Regards,
    Shawn

  • How to make a List box connected to a Column Chart work?

    Hi...
    I've just installed my Xcelsius 2008 and am trying to adapt the dashboard I developed in Xcelsius 4.5 version to the new software.
    I have a fish-eye to filter which customer I want to see the performance for.
    I have two list boxes where I can decided which KPI and which factory.
    The chart should adapt according to the choices in the list boxes.
    In the excel spreadsheet I have a long list of rows with a vlookup function based on the two cells connected to the list boxes. This means as insert in for list box I am using position.
    It just doesn't work.
    Can someone help?
    Rosemary

    I have checked all cells and all are correct (I even started the dashboard from scratch).
    I believe it is something to do with my set-up but I have no clue what:
    If I use for my list boxes the position insert in type and choose a cell which I use for my vlookup, meaning:
    4     Insert in cell
    1     NC performance
    2     Pro-active Reporting
    3     Requests Response
    4     POD provision
    5     Damage / Loss Rate
    (From 1 to 5 are the labels for the list box)
    I have a vlookup cell:="C"&W8&"_K" & W18&"_S"&W40 which indicates which data is to be used in the chart (according to the selection, the vlooup fills out a cells range with the corresponding performance).
    For the chart I am using the cells range with the vlookup formulas.
    What could be wrong?
    Thanks

  • List Box Combo box linkage

    Hi,
    I have a dashboard with a regional filter that has the same 5-metric associated to each region.  I'd like my regional global combo box to filter by each indexed metric, for example, if I select KPI 2 and Global from the combo box, I'd like the index 2 to display in order chart data indexed to 2. Each metric has a unique index # associated to each regional metric, for example:
    Index      Region    Metric
    1             Global     KPI 1
    2             Global     KPI 2
    3             Global     KPI 3
    4             Global     KPI 4
    5             Global     KPI 5
    6             NA          KPI 1
    7             NA          KPI 2
    8             NA          KPI 3
    9             NA          KPI 4
    10           NA          KPI 5
    I've selected Row as the Insertion type with two series types (Global and NA).  Each series type has it's own sourced data but all point to the same destination row (A:26:C26).  I have the combo box inserting the regional source value to the cell where the list box inserts the region B26.  When I preview only one series (NA) from the list box is dynamic, meaning  if I select KPI 2 the spredsheet selector displays the region (NA) and Index 7, but when I switch regions, to Global, it's not linked to the list box and properly capturing the new index # 2.  How can I link my list box with two series (Global and Region) to filter by Region combo box?

    Hi Araceli,
    I do not fully understand your problem (I don't understand what the listbox does). But what might work a lot easier for you is to use the Filter option and not split comboboxes. That way Xcelsius can sort it out for you without having to write too much logic.
    Or are you already using a filter?

  • Multiple Selection List Box-- Data Reporting Problem...

    I want to build a form which reports all of the multiple selections made by users from a list box. When I test the form, only the first selection is reported in the dataset. How do I configure the form so that when data is compiled, each of the selections from the list box is reported in sequence?

    Here is the solution for the requirement.
    Add another 2 columns in the resource list: test1 (set default value to 1), test2 (no default value).
    Set test1 to 1 for all existing items in the resource list.
    Set test2 to 2 for the 10 special items.
    Custom form from InfoPath Designer, modify the data connection and also include the test1 and test2.
    Go to drop down control properties and make sure its value is 1 and 2.
     Go add the filter to multiple selection box control like this.
    Note: field1 is the field used by my drop down control in Main data connection.
        7.    Done. Now when we select test1 in drop down, we can see all list items in multiple selection box. And when we select test2 in drop down, we can see the 10 list items that with test2 column filled with 2.
    Thanks & Regards,
    Emir
    Emir Liu
    TechNet Community Support

  • List box strategy

    Hello all, I have a multi-column list box that displays information that matches a two-dimensional array. So for example if my array is set up like this:
    [a,b,c,d,e],
    [e,f,g,h,i],
    [j,k,l,m,n]
    There would be three list items with the following 4 letters being subItems.
    Now is there anyway to somehow attach more information to the row that is not visible to the user? That is if my array was set up like this:
    [a,b,c,d,e,up,down,left,right],
    [e,f,g,h,i,north,south,east,west],
    [j,k,l,m,n,forward,backwards,leftSide,rightSide]
    I could display only the letters in each row, but say when that row is selected I would have access to the direction data? I originally would just match the indices in my array with those in the list box but I have a filter that changes the what gets displayed in the list box so the indicies no longer match up. I've looked for like an insertLabel method on list items but they don't exist. So after my fair share of research I thought I would reach out to those a little more experienced! Any Ideas would be helpful!
    Thanks!

    Thanks. Just log it for all of them.
    Jason
    On 7/26/2011 10:04 AM, Scroon wrote:
    > Sure, and same problem with regular parameters with multi-values
    >
    >
    > Jason Weathersby wrote on Tue, 26 July 2011 10:00
    >> Can you log an enhancement for this?
    >>
    >> Jason
    >>
    >>
    >> On 7/25/2011 6:38 PM, Scroon wrote:
    >> > Hello,
    >> >
    >> > For a custom parameter page using BIRT tag library:
    >> >
    >> > <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    >> > pageEncoding="ISO-8859-1"%>
    >> > <%@ taglib uri="/birt.tld" prefix="birt" %>
    >> > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    >> "http://www.w3.org/TR/html4/loose.dtd">
    >> > <html>
    >> > <head>
    >> > <meta http-equiv="Content-Type" content="text/html;
    >> charset=ISO-8859-1">
    >> > <title>Insert title here</title>
    >> > </head>
    >> > <body>
    >> >
    >> > <birt:parameterPage id="birtParmPage"
    >> reportDesign="report\Report.rptdesign"
    >> > name="my form"
    >> > pattern="frameset"
    >> > format="html"
    >> > isCustom="true"
    >> > showTitle="true"
    >> > showToolBar="true"
    >> > showNavigationBar="true"
    >> > target="content"
    >> >>
    >> >
    >> > Cascading Parameter1:
    >> > <birt:paramDef id="5" name="ClientName"/>
    >> > <br>
    >> > Cascading Parameter2:
    >> > <birt:paramDef id="22" name="Strategy" />
    >> >
    >> > <input type="submit" name="submit" value="Run Report"/>
    >> > </birt:parameterPage>
    >> > <br>
    >> > </body>
    >> > </html>
    >> >
    >> > Here the cascading parameter Strategyis set to allow multiple value
    >> in BIRT designer, since it's the last child of the cascading parameter
    >> group.
    >> >
    >> > And it works well with default parameter page of BIRT:
    >> >
    >> >
    >> > However, in my custom parameter page, it always be rendered as a
    >> single-value list box:
    >> >
    >> >
    >> > which can not allow use to select multiple values.
    >> >
    >> > Is there anyway to have it rendered as a multi-value list box like
    >> in default paramter page of BIRT ?
    >> >
    >> > Thanks in advance!
    >> >
    >
    >

  • List box filtering

    I have a listbox and have bound it to a datatable in a dataset.
    I want to let the user type part of a word and have the list box filter the items according to that.
    is there any way to do that?
    do I need to work on the listbox itself or the datatable to achieve it?
    thanks in advance.
          Anoosh

    Hi anoushiravan,
    I load the ListBox like below.
    private void Form1_Load(object sender, EventArgs e)
    dt.Clear();
    dt.Columns.Add("Name");
    dt.Columns.Add("Marks");
    DataRow r1 = dt.NewRow();
    r1["Name"] = "ravi";
    r1["Marks"] = "500";
    dt.Rows.Add(r1);
    DataRow r2 = dt.NewRow();
    r2["Name"] = "dadavse";
    r2["Marks"] = "500";
    dt.Rows.Add(r2);
    DataRow r3 = dt.NewRow();
    r3["Name"] = "nnnn";
    r3["Marks"] = "500";
    dt.Rows.Add(r3);
    DataRow r4 = dt.NewRow();
    r4["Name"] = "ee";
    r4["Marks"] = "500";
    dt.Rows.Add(r4);
    DataRow r5 = dt.NewRow();
    r5["Name"] = "reas";
    r5["Marks"] = "500";
    dt.Rows.Add(r5);
    DataRow r6 = dt.NewRow();
    r6["Name"] = "tyjns";
    r6["Marks"] = "500";
    dt.Rows.Add(r6);
    this.listBox1.DataSource = dt;
    this.listBox1.DisplayMember = "Name";
    Filter the listBox with TextChanged event like below.
    I filter the listBox by filtering the DataTable.
    private void textBox1_TextChanged(object sender, EventArgs e)
    DataView dv = dt.DefaultView;
    dv.RowFilter = "Name like '%"+this.textBox1.Text+"%'"; //the Name is the Column name in DataTable
    this.listBox1.DataSource = null;
    this.listBox1.DataSource = dv;
    this.listBox1.DisplayMember = "Name";
    The Result:
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Reg: Drop-Down list Box not  displaying values

    Hi Experts,
                     i am publishing a module pool program in the internet using SICF Transaction . In the internet my drop down list box is not displaying the default value  but in my sap it works fine .
    What may be the problem?
    Regards,
    Vikram

    Hello Thorsten Domsalla ,
                      My Problem is in my sap module pool program there is a drop down list box which disaplays  default values its working fine in sap gui but when i access through internet (SICF) Transaction the Drop down list box not listing out default values .
    i am using Integrated ITS Version 7.0 and Support package 08.
    Regards,
    Vikram

  • Getting multiple values from a list box

    Hi,
    I am not able to get multiple selected values from a list box using the getParameterValues(). I used the following code..
    String[] names=request.getParameterValues("lname");
    can anyone tell me what the error is or is there any other way i can get multiple selected values from a list box.
    Thanks
    Satish

    Fragment 1
    This is the JSP Code am using for testing
    <%
    String[] name =request.getParameterValues("D1");
    if(name.length==1)
    String value=name[0];
    Instead of name.lenght==1 try with name!=null
    Fragment 2
    out.println(value);
    replace the above fragment with
    %>
       <%-- print result -->
       <%=name[0]%>
    <%
    Fragment 3
    else
    %>
    The list box D1 is a multiple select list box.
    If it still doesn't work, check that the checkboxes have the same name as well as different values
    <input type="checkbox" name="D1" value="1">
    <input type="checkbox" name="D1" value="2">I hope this helps :-)
    Good luck
    touco
    ps: i want duke

  • How to capture the selected values from module pool dialog list box !

    Hi experts,
    Can anyone help me out in capturing the values from the list box.
    i am able to set the values in the list box.But i am not able to capture the selected value from the list box. Always the list box name is getting as "space"
    I also tried in using the FM "VRM_GET_VALUES" but it is retireving all the values. Is there is any flag for filttering out the selected value.
    Your inputs are appreciated.
    Thanks,
    Vijay.

    Along with the PBO and PAI event, add a POV event in the flow logic of the screen
    DEMO_DROPDOWN_LIST_BOX -is a good demo example.
    PROCESS ON VALUE-REQUEST.
    FIELD structure_name-field_name MODULE create_dropdown_box.
    In the report :
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
    ENDMODULE.
    In the layout, assign a Function Code , for eg : 'SELECTED' to the listbox and lets say name of the field is SDYN_CONN-CARRID. So in the PAI module,
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
      ENDCASE.
    ENDMODULE.
    sdyb_conn-carrid will contain your selected field

  • How to set a default value for a drop down list box and then apply cascading based on the default value in Infopath 2010.

    Hello Everyone
    I have two drop downs. Both are coming from look up fields from two lists. i want to set a default value(first list item) for the first drop down list box and then apply cascading based on the default value for the next drop down list box. I found one article(http://www.bizsupportonline.net/infopath2010/display-first-item-drop-down-list-box-infopath-2010.htm)
    where in i can set a default value but i can't apply cascading based on that default value. Any suggestions would be highly appreciated.
    Thanks
    Ramanjulu Naidu N

    Hey Ramanjulu,
    Take a look at the below article which I believe will answer your question.
    http://basquang.wordpress.com/2010/03/29/cascading-drop-down-list-in-sharepoint-2010-using-infopath-2010/
    Daniel Christian (MCTS)

Maybe you are looking for