How to maintain state in multi select form. ( ASP classic )

I have a mutli select form fields e.g.:
<select name="Location" multiple="multiple" >
<option value="8">Anglesey</option>
<option value="11">Cheshire</option>
<option value="5">Conwy</option>
</select>
say i select the first 2 of the 3 options and submit my page
e.g. :
mypage.asp?Location=8&Location=11
how would i then set the state of the options to selected
e.g. :
<option value="8"
selected="selected">Anglesey</option>
<option value="11"
selected="selected">Cheshire</option>
<option value="5">Conwy</option>
help and suggestions appreciated

Hi Arvind, your best bet might be to pass the filter value via a QueryString and then apply a QueryString filter to those other pages. Overview of QueryString Filters:
http://office.microsoft.com/en-us/sharepoint-server-help/connect-a-query-string-url-filter-web-part-to-another-web-part-HA010250999.aspx (I know it's for 2007, but the same applies to 2013).
Dimitri Ayrapetov (MCSE: SharePoint)

Similar Messages

  • How can I validate a multi-select box to have at least 1 option

    How can I validate a multi-select box to have at least 1 option
    selected in struts?

    thanks i will try that other then that if I want to create single drop down list and pass multiple values associated to that drop list value how would i do that....

  • How do I default a multi-select to have all values selected

    Hi all,
    I have a report (standard, not interactive - for various reasons) and I have a number of 'search' fields that the use can use to fulter the results shown. One of these fields is a multi-select list which allows the users to select multiple values at the same time. This is working fine.
    My problem is in setting the default for the multi-select list to have all values selected (either when the page is first opened or when the user clicks a 'reset' button).
    The multi-select query is:
    select
         lv1.description d, lv1.lookup_code r
    from
         tpa_adm_lookup_types lt1,
         tpa_adm_lookup_values lv1
    where
         lv1.lookup_type_id = lt1.lookup_type_id
    and lt1.lookup_type = 'RELEASE_PHASES'
    and     lv1.delete_flag = 'N'
    order by 1
    how do I get it to default to everything selected?
    Many thanks,
    Martin

    Hi Andy,
    Yes it is a dynamic list so a fixed default is no good.
    I have built the field with a source (when session state is null) of:
    with data as (
    select lookup_code, row_number() over(order by lv1.description) rn,count(*) over () cnt
    from tpa_adm_lookup_values lv1,
         tpa_adm_lookup_types lt1
    where lv1.lookup_type_id = lt1.lookup_type_id
    and lt1.lookup_type = 'RELEASE_PHASES'
    and lv1.delete_flag = 'N'  )
    select ltrim(sys_connect_by_path(lookup_code,':'),':') catvalues
    from data
       where rn = cnt
       start with rn = 1
       connect by prior rn = rn-1;which works but I was hoping ApEx had a cleaner solution.
    Regards,
    Martin

  • How to Save State on an Entry Form prior to Submitting the Form?

    I want to be able to save the values the user enters to fields on the entry form if they navigate away from the page and come back (without the user clicking the submit button for the form.) For example, one of the input fields has a goLink to go to another page to lookup a field value - when the user returns from the page, all other form field values are cleared. If the user does submit the form by clicking the command button, then all form field values are saved (if the user navigates from the page and comes back, all values are retained.) What I'm trying to do then is somehow save the values (passivate the state) for the field the user has filled in when the user navigates from the page without submitting the form. Any suggestions?
    I am using a read-only View Object with all transient values. The VO is configured to passivate state including all transient values. The initial row is created programmatically; there will only be one row for the VO used as an entry form. I am not using a backing bean for the values and would prefer not to use one, but would rather use the VO's capability to passivate state to save the data values. The question then seems to be how to force the VO to passivate state prior to the form being submitted.
    thanks
    Message was edited by:
    javaX

    "My hunch is that the real problem is that the fields are not being set into the bindings due to the use of immediate="true"."
    Yes. Now I see that is the real problem. Is there anyway to force setting the bindings from the input form field values if the user navigates from the page using a goLink, or commandButton with immediate="true" other than overriding the default FacesPageLifecycle classes?
    I'd prefer not to have to do that unless necessary, and, if I over-ride that method, then how could I get it to work normally when the user presses the commandButton at the end of the form and I do want all validation checks to be performed (immediate=false for the form's submit button; immediate=true only for lookup commandButtons used for certain fields)?
    Here's an overview of how I set the page up:
    1. create transient view object; all attributes marked as always updateable; passivate state=true for VO and all transient values; no key id field selected (will only ever be one row - just using VO to save values that will eventually be used to do an insert to the database);
    2. transient VO added to Application Module
    3. Add data control to .jspx page as an ADF Form (not an ADF Creation Form)
    4. Add code to AM to create the initial row for the input form
    protected void prepareSession(Session session) {
    super.prepareSession(session);
    insertTransientViewObjRows();
    private void insertTransientViewObjRows() {
    ViewObject transientvo = getViewObj1();
    transientvo.clearCache();
    transientvo.insertRow(transientvo.createRow());
    --- Entry Form .jspx pagedef.xml snippet ---
    <executables>
    <iterator id="MyIterator" RangeSize="10" Binds="MyView"
    DataControl="AMDataControl"/>
    </executables>
    <bindings>
    <attributeValues id="sponsorid" IterBinding="MyIterator">
    <AttrNames>
    <Item Value="sponsorid"/>
    </AttrNames>
    </attributeValues>
    --- Entry Form .jspx page snippet ---
    <h:form>
    <af:panelForm>
    <af:panelLabelAndMessage label="#{bindings.sponsorid.label}">
    <af:panelGroup layout="horizontal">
    <af:inputText value="#{bindings.sponsorid.inputValue}"/>
    // state will not be saved for other form field values if use immediate="true" when temporarily navigate away from page and return; don't want to validate other form fields here
    <af:commandButton text="Lookup Details"
    action="lookup-page" immediate="true"/>
    </af:panelGroup>
    </af:panelLabelAndMessage>....
    // state will be saved with immediate="false" when user submit forms at end of entry (need to perform validation of form's required fields here)
    <af:commandButton text="Continue to Next Step" immediate="false"
    action="nextpage"/>
    Message was edited by:
    javaX

  • How to make list item multi select

    Hi all,
    I'm suing Oracle 10g and I want to make a TList multi-selectable and then how I can return the selected records
    Thanks in advance :)

    This is where you should go
    ttp://www.oracle.com/technology/sample_code/products/forms/index.html
    in add , with it is not possible with a default TLIST, LOV ...., so you'll need to create your own:
    for example, I use a normal block with a checkbox on each row for the user to select records

  • How to dipsplay value of multi select prompt in Answers

    I have a request in Answers that has a multi select column prompt. I can display the value selected in the prompt in the Narative view as long as only one value is selected. When more than one value is selected, how can I display the multiple values selected in the Narative view?
    Thanks in advance.
    Sandeep

    Multi select can not be assigned to Presentation variable (It is greyed out), so you can not get the respective values.

  • How to open  business partner Properties selection form(OCQG table)

    Dear all ,
    Is there any object for business partner Properties which are stored in OCQG table
    Can anybody tell me
    how to open the properties selection form as incase of
    Financials->Financial Reports->Accounting->G/l Accounts and Business Partners-> Click on Properties Button
    I want to open this form  is there any way to do it
    Thank you
    Atul

    Hello Atul,
    With the sbo sapbouicom object you can for example simulate a buttonclick.
    I suggest that you use in your code:
    ActivateMenuItem("13057") //(G/l Accounts and Business Partners)
    and then you simulate a click on the property-item/button.
    Hope this helps.
    Best regards Teun

  • Query values in Multi Select form field

    I have a table and one of the fields is a multiple select box. It is currently working fine
    What I now need to do is create a report based on the individual elements in that field: (This report will really just do a count of the events for ownership purposes)
    Example:
    Table simplified:
    Name     | Teams Involved
    One     | TeamA:TeamB:TeamC:TeamD
    Two | TeamC
    Three | TeamB:TeamD
    Four | TeamA:TeamD
    Five | TeamD
    Six | TeamA
    Seven | TeamA
    Eight | TeamB
    The Teams Involved are populated from a Multiple Select LOV so the Data will always remain constant in spelling etc...
    TeamA
    TeamB
    TeamC
    TeamD
    I am trying to create a report that will show me the number of times a team is selected in the Teams Involved column and the results would look like:
    TeamA 4
    TeamB 3
    TeamC 2
    TeamD 4
    I am not very good with PL/SQL but assuming I might need to do a foreach loop type using the values in the LOV and the LIKE %LOVVALUE% but just not really sure
    any assistance would be appreciated.
    Thanks in advance
    wfsteadman

    As Prabodh pointed out, I'm placing a colon at the beginning and end of the value list before doing the LIKE, so every value in the list is guaranteed to have a colon before and after it.
    Of course, this could be a performance issue if your dataset becomes large--you're not going to be able to use an index on this column--in which case you'll want to go to a more normalized solution (a table for your teams, a table for your projects [or whatever], and a reference table in the middle), but then you'll need to worry about parsing your multi-select values via a view with an instead of insert trigger. I do this on my blog for assigning tags to posts; it's not difficult, but APEX--for whatever reason--doesn't expose triggers on views as easily as on tables.
    -David

  • How to query on a Multi-Select Picklist?

    With the Oracle Web Service, I'm having trouble trying to figure out why I am unable to query for a Lead using only a Custom MultiSelect Picklist that I have.
    The Multi-Select Picklist has 3 values:
    - Picklist 1 (ID: <No Values>)
    - Picklist 2 (ID: Picklist 2)
    - Picklist 3 (ID: Picklist 3)
    I have leads with selected values
    - Picklist 3
    - Picklist 2 and Picklist 3
    Whether I query for any leads with a single value or multiple values, I'm getting nothing in return.
    ~= 'Picklist 3' (Returned Nothing but results do exist in the CRM UI)
    ~= 'Picklist 2;Picklist 3' (Returned Nothing but results do exist in the CRM UI)
    ~= 'Picklist 2,Picklist 3' (Returned Nothing but results do exist in the CRM UI)
    When I query using LIKE though, I get results....one of the results being a lead with just "Picklist 3" as the value for the Multi Select Picklist
    ~LIKE '*Picklist 3*' (25 Leads are returned with values of both Picklist 3 and Picklist 2, Picklist 3)
    And as a side note, I'm able to successfully insert/update values into this Multi select picklist as
    Picklist 2;Picklist 3
    Any help would be greatly appreciated!

    Kishore
    Thank you for the reply. Unfortunately, I have already specified the fields I do want returned...I just didn't post them as they are irrelevant to my question. What my question is attempting to say is that if I were to run my actual query on a database the query would look like this:
    select LeadEmail from Lead where CustomMultiPicklist1 = 'Picklist 3' (Using the API: ~= 'Picklist 3')
    This returns 0 results even though I have a Lead with CustomMultiPicklist1 = 'Picklist 3'
    On the other hand if I were to do the following query....results are returned.
    select LeadEmail from Lead where CustomMultiPicklist1 like '%Picklist 3%' (Using the API: ~LIKE '*Picklist 3*')
    So pretty much I'm trying to figure out what the correct syntax is for querying CustomMultiSelectPicklists only.
    Thanks
    Edited by: tyler m on May 5, 2010 7:17 AM

  • How to highlight State of Multi-State object?

    hi,
    I have created 3 states of object State1, State2, State 3. and want to highlight state in object state panel programmatically. can any one have idea abt it?

    @Priyanka – you did not mention a specific scripting language.
    In ExtendScript (JavaScript) you can set the "active" property of the 3rd state of your MultiStateObject to value "true".
    //ExtendScript (JavaScript) example
    //Make sure a MultiStateObject is selected; nothing else, then run this JavaScript:
    app.selection[0].states[2].active = true;
    The expression from left to wright (for lurkers who never saw a line of code):
    app => application (that's InDesign, of course)
    selection => your current selection in the UI (could be one item, could be many)
    [0] => index number 0 is the first item in your selection; be cautious with the expression "first", it depends on the InDesign version what that does exactly mean, if you selected more than one object
    states => obviously the "state" object (always with the plural "s", it's the collection of all states in that selected MultiStateObject)
    [2] => index number 2 is the 3rd element of the states collection
    active => property for the active status; boolean, could be "true" or "false"
    = => with the "=" sign, you are setting the value
    true => the value of the property; self-explanatory, I hope…
    ; => end of expression, all that comes after is a different expression.
    The different parts are held together with a dot-notation. The index  is directly glued to its object, no dot notation between object and index.
    If you want learn more about ExtendScript and the InDesign DOM see Jongwares' documentation at:
    http://www.jongware.com/idjshelp.html
    Uwe

  • How to display Lov as Multi select dropdown

    Hi
    I am using 11.1.1.6 version.
    I have created a LOV for one attribute, I want to display it as multiselect dropdown.
    Could you please help me how to achieve this ?
    Best Regards,
    Jagadeesh Badri

    @KT there is no such a thing. All the options are related to single selection.
    @JagadeeshBadri as Vinay said, you need to create something by yourself. You can use selectManyChoice component to iterate over the view you want. Then write a selectionListener or something like that that will copy the selected items to your variable. What is your use case anyway?
    Regards

  • How do i create a multi part checkout form for my ecommerce checkout?

    Hey Guys,
    I was following this video on creating multi-part forms: http://www.bcgurus.com/tutorials/increase-conversion-with-multi-step-web-forms
    I'm trying to set this up on my checkout page (order_registration-us.html), but it seems BC does not let me do this. Upon submit, i am not sent to the step 2 form, but rather, i am given a receipt for the order. How do i setup the multi part form? Your help is greatly appreciated!

    You can not do that on that form as that form is looking to process eCommerce sales.
    Better question is why?
    In modern UI and UX design and methadology multi step forms are to be avoided, why do you need so many fields? IS your form one field at a time going down the website?
    If that is the case then you should look to design your forms to have multiple coloulmns and be smarter. Combining first and last name fields into the FullName field for example.
    Hiding the shipping fields and have a tick box and javascript to say "shipping same as billing" and so on.

  • How to get default values on selection screen(multiple ranges)?

    i want to know how to maintain default ranges in selection screen...like 2000 to 3000 and 7000 to 8000 and 11000 to 15000
    all the above ranges must get by default how to provide those to selection screen by default...please give me idea...with example...

    Hi Suresh,
    You can either use select-options or Ranges. If you want the selection screen to be displayed with allwoing user to enter values apart for the default ones use select options else use ranges. With ranges what ever values use hard code would be set and the end user will not be able to add any more values (or range of values).
    Simply write the following code
    tables : <name of the table from which the field belongs>
    select-options <fieldname> for <tablename>-<fieldname>.
    <fieldname>-sign = 'I'.
    <fieldname>-option = 'BT'.
    <fieldname>-low = '7000'.
    <fieldname>-high = '8000'.
    append <fieldname>..
    similiarly add all the ranges that you need to include as default and in your select statement use the IN operator inthe where clause to include the range.
    If using range replacethe select-option with the range statement.
    Thanks.

  • How to maintain dynamic rows with data when click on Previous button?

    Hi,
    I have 1 aspx page and divided into 3 pages using panels.Each panel has "Next" and Previous buttons
    I have created and deleted dynamic table rows when click on Add button using javascript. whenever i click on Next button it will navigate to same page of next panel.
    when i click on previous button then it goes to previous panel but whatever i have added dynamic table rows in 1st panel that got removed.
    Can u please help me for how to maintain state of dynamic table rows with entered data when click on Previous button?
    How to get dynamic table rows with entered data in previous panel when click on Previous button?
    Please find the below javascript code:
    function insertRow() {
    if (index >= 2) {
    document.getElementById('deleteRow').style.display = "inline";
    else { document.getElementById('DeleteRow').style.display = "none"; }
    var table = document.getElementById("myTable");
    var row = table.insertRow(table.rows.length);
    cell1 = row.insertCell(0);
    t1 = document.createElement("select");
    t1.options[t1.options.length] = new Option('--Select--', '0');
    t1.id = "ddlYear" + index;
    cell1.appendChild(t1);
    for (var i = 1975; i <= 2015; i++) {
    opt = document.createElement("option");
    opt.value = i;
    opt.text = i;
    t1.add(opt);
    t1.style.width = "155px";
    var cell2 = row.insertCell(1);
    t2 = document.createElement("Select");
    t2.options[t2.options.length]=new Option('--Select--','0');
    t2.options[t2.options.length]=new Option('State Board','1');
    t2.options[t2.options.length]=new Option('CBSE','2');
    t2.options[t2.options.length]=new Option('ICSE','3');
    t2.options[t2.options.length] = new Option('Others', '4');
    t2.style.width = "155px";
    t2.id = "ddlCourse" + index;
    cell2.appendChild(t2);
    var cell3 = row.insertCell(2);
    t3 = document.createElement("input");
    t3.id = "txtCity" + index;
    cell3.appendChild(t3);
    var cell4 = row.insertCell(3);
    t4 = document.createElement("input");
    t4.id = "txtInstitute" + index;
    cell4.appendChild(t4);
    var cell5 = row.insertCell(4);
    t5 = document.createElement("Select");
    t5.options[t5.options.length] = new Option('--Select--', '0');
    t5.options[t5.options.length] = new Option('English', '1');
    t5.options[t5.options.length] = new Option('Hindi', '2');
    t5.options[t5.options.length] = new Option('Telugu', '3');
    t5.options[t5.options.length] = new Option('Others', '4');
    t5.style.width = "155px";
    t5.id = "ddlMedium" + index;
    cell5.appendChild(t5);
    var cell6 = row.insertCell(5);
    t6 = document.createElement("input");
    t6.id = "txtSpecialization" + index;
    cell6.appendChild(t6);
    var cell7 = row.insertCell(6);
    t7 = document.createElement("input");
    t7.id = "txtFnl" + index;
    cell7.appendChild(t7);
    index++;
    function DeleteRow(index) {
    var table = document.getElementById("myTable");
    table.deleteRow(index);
    // if (index = 2) { alert("There is no rows added.Please add the new row"); }
    Design:
    <tr style="font-size: 12pt" id="trSecond" runat="server">
    <td colspan="3">
    <table id="myTable" width="100%" border="0">
    </table>
    <tr>
    <td colspan="3" align="right">
    <input type="button" title="Add" value="Add" onclick="insertRow();" />
    <input type="button" id="deleteRow" title="Delete" value="Delete Row" onclick="DeleteRow(this);" style="display:none" />
    </td>
    </tr>
    Thank you.

    Put the button click into an action listener and build the new frame there. The code I have below isn't exactly what you're doing (it's amazingly oversimplified), but it's probably similar enough to get your wheels turning in the right direction.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class sample
         public static void main(String[] args)
              JFrame frame = new JFrame("Sample");
              frame.setSize(400,400);
              Container content = frame.getContentPane();
              content.setLayout(new FlowLayout());
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              final JTextField text = new JTextField(10);
              content.add(text);
              JButton button = new JButton("Send");
              content.add(button);
              frame.setVisible(true);
              button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        JFrame myframe = new JFrame("Results");
                        myframe.setSize(200,200);
                        Container mycontent = myframe.getContentPane();
                        mycontent.setLayout(new FlowLayout());
                        String mytext = text.getText();
                        JLabel label = new JLabel();
                        label.setText(String.valueOf(mytext));
                        mycontent.add(label);
                        myframe.setVisible(true);
    }

  • Using Multi Select List in SQL Query

    Hi all,
    I am trying to using a Multi Select list for filtering of a report. I have :P2_RISK_SEVERITY which has has the possibility of values Very Low:Low:Medium:High:Very High. How do I use this Multi Select in the where section of a SQL query?
    I need to say something along the lines of:
    Select RISK_SEVERITY from TBL_RMD_RISKS where RISK_SEVERITY = (one of the options selected in the multi select)
    Thanks for the help.

    Hi there,
    The above suggestion will work perfectly as long as the table you're querying is relatively small, but keep in mind that applying the INSTR to the left side of the WHERE clause will always result in a full table scan. This means that if your table is large and RISK_SEVERITY is indexed, the index will never be used. Here is another approach (credit to AskTom) that converts your colon-delimited string of selected values to a list that can be used in an "IN(...)" clause, which will use an index on RISK_SEVERITY as long as the optimizer otherwise deems it appropriate:
    -- creates a type to hold a list of varchars
    CREATE OR REPLACE TYPE vc2_list_type as table of varchar2(4000);
    -- converts a colon-delimited string of values to a list of varchars
    CREATE OR REPLACE FUNCTION vc2_list(p_string in varchar2)
       return vc2_list_type is
       l_string       long default p_string || ':';
       l_data         vc2_list_type := vc2_list_type();
       n              pls_integer;
    begin
       loop
          exit when l_string is null;
          n := instr(l_string, ':');
          l_data.extend;
          l_data(l_data.count) := ltrim(rtrim(substr(l_string, 1, n - 1)));
          l_string := substr(l_string, n + 1);
       end loop;
       return l_data;
    end vc2_list;
    -- your WHERE clause
    where risk_severity in(
             select *
               from the(select cast(vc2_list(:P2_RISK_SEVERITY) as vc2_list_type)
                          from dual))
    ...Hope this helps,
    John

Maybe you are looking for

  • Flash Media Live Encoder high latency

    Hello, we are trying to stream via Flash Media Live Encoder over a satellite connection (high latency of 1500 ms) and we get data rates no more of 500 kbps although there is available bandwidth to use. Is there any configuration parameter value to co

  • The sign-in graphic changed on my macbook air for no apparent reason.  what's up?

    The sign-in graphic changed on my macbook air for no apparent reason.  What's up?  How do I get it back to my chosen graphic and why did this happen?

  • Need help installing WRT54G v4

    Okay, this is getting really obnoxious. My warranty ran out on this thing a while back and so they won't help me on the phone, which I think is BS to begin with since I paid for this product I don't think there should be a limit on when I can get hel

  • Copy/Paste Settings mystery?

    OK. I've searched this forum and either haven't used the appropriate phrase or it's just not covered. I have tried and tried to use "Develop > Copy Settings..." and "Develop > Paste Settings" to transfer various settings from one image to one or more

  • Table panel nnull pointer exception

    Hey i'm having some truble with a Null Pointer Exception I'm getting whene using a JTreeTable within a JPanel. Whenever I change one of two special Columns (One ComboBox, one Spinner Text Field) with the ComboBox I get a null pointerexception whene u