Pre-Populate Dropdown based on information selected in another dropdown

Hello,
I hope this make since. I am working on building a form using Adobe Livecycle Designer. I have a dropdown list in multiple fields on the same form that will have the same information selected. I want the additional fields to automatically populate the information a user selects in the first dropdown list. Is this possible ??? If so, what would be the script/code necessary to do so ??? Thank you for your help.
Example
City, State appears in 4 different fields based on the selection in field 1, the additional 3 fields auto-populates the same information.
Field/List 1: New York, NY <-- Selected City, State
Field/List 2: New York, NY <-- Auto Populated based on field 1
Field/List 3: New York, NY <-- Auto Populated based on field 1
Field/List 4: New York, NY <-- Auto Populated based on field 1

In the exit event of the first State field, using Javascript, something like this should work:
State2.rawValue = this.rawValue;
State3.rawValue = this.rawValue;
State4.rawValue = this.rawValue;
...where "State2", "State3", etc. are references to the other dropdowns you want to populate with the same information from the first state field.
Be sure to set the binding values in the BINDING tab of the dropdowns to the same in each dropdown,
Brian

Similar Messages

  • Dynamic dropdown based on user selection of another dropdown on the same page

    hi all, ok, I have a table which contains use data, a name,
    and a userID. for the example lets say "Simon Bullen" and my userID
    is "999".
    on a form I have, there is a dropdown box, which is dynamic
    from this table, and allows me to select Simon Bullen, however, I
    have a hidden field on the form, which when the user selects "simon
    bullen" the hidden field populates with the appropiate U number
    from the same table.... no i thought this would do it:
    <cfquery name="userNumber" datasource="userList">
    SELECT userNumber FROM dbo.Users WHERE Name =
    <cfqueryparam value="#form.Name#">
    </cfquery>
    and then my dynamic form field (hidden) would reference to
    this query....
    but it doens't work, could somebody please enlighten me? I'm
    hoping its something silly
    Thanks in advance

    You could make the value of the option the UserID and the
    option display the name.
    If that isn't what you need, I think you'll need some
    javascript to populate your hidden field based on what is chosen in
    the select.
    I think you can modify this:
    http://www.javascriptkit.com/javatutors/selectcontent2.shtml
    ...to populate your hidden field instead of a new select
    list.
    If there's a way to do that without JS I'm not aware of it.
    A third possibility: look up the UserID (based on the name
    chosen) after the form is submitted then do with it whatever you
    need to.

  • Populating values in dropdown based on values selected in second dropdown.

    Hi,
    I  have two listboxes on the screen. Based on value chosen in first dropdown, I want to populate the values to be selected in second dropdown. How can i achieve this? I would be glad if anyone can help me out with this requirement.
    Thanks,
    Ameet

    <font color=blue>Hi,
    <li> Place 2 input fields on screen.
    <li>Set Listbox property as it is shown in the below link.
         <a href="http://2.bp.blogspot.com/_O5f8iAlgdNQ/SmPSPnRa0tI/AAAAAAAAFCQ/wW_URP-ld6o/s1600-h/drop_down-770536.JPG" target="_new">link to dropdown setting</a>
    <li>Set function code to first dropdown box to trigger event when you select value from first dropdown box. So that second one is changed.
    <li>Declare variable like below in TOP include of the module pool program.
    <pre>DATA: g_drop_1 TYPE char10,
          g_drop_2 TYPE char10,
          ucomm    TYPE sy-ucomm.
    TYPE-POOLS vrm.
    DATA: name  TYPE vrm_id,
          list  TYPE vrm_values,
          value LIKE LINE OF list.</pre>
    <li> Use screen flow logic of the screen like below
    <pre>"PROCESS BEFORE OUTPUT.
    PROCESS BEFORE OUTPUT.
    field g_drop_1 MODULE drop_down_1.
    field g_drop_2 MODULE drop_down_2.
    "PROCESS AFTER INPUT.
    PROCESS AFTER INPUT.
    field g_drop_1.
    field g_drop_2.</pre>
    <li>Corresponding code for two drop down boxes.
    <pre>&----
    *&      Module  DROP_DOWN_1  OUTPUT
    MODULE drop_down_1 OUTPUT.
      CLEAR: list[],g_drop_2.
      name = 'G_DROP_1'.
      value-key  = '1'.
      value-text = 'value_1'.
      APPEND value TO list.
      CLEAR  value.
      value-key  = '2'.
      value-text = 'value_2'.
      APPEND value TO list.
      CLEAR  value.
      value-key  = '3'.
      value-text = 'value_3'.
      APPEND value TO list.
      CLEAR  value.
      value-key  = '4'.
      value-text = 'value_4'.
      APPEND value TO list.
      CLEAR  value.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id     = name
          values = list.
    ENDMODULE.                 " DROP_DOWN_1  OUTPUT
    *&      Module  DROP_DOWN_2  OUTPUT
    MODULE drop_down_2 OUTPUT.
      CLEAR list[].
      name = 'G_DROP_2'.
      CASE g_drop_1.
        WHEN 1 OR 2.
          value-key  = '1'.
          value-text = 'text1'.
          APPEND value TO list.
          CLEAR  value.
          value-key  = '2'.
          value-text = 'text2'.
          APPEND value TO list.
          CLEAR  value.
        WHEN 3 OR 4.
          value-key  = '3'.
          value-text = 'text3'.
          APPEND value TO list.
          CLEAR  value.
          value-key  = '4'.
          value-text = 'text4'.
          APPEND value TO list.
          CLEAR  value.
      ENDCASE.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id     = name
          values = list.
    ENDMODULE.                 " DROP_DOWN_2  OUTPUT</pre>
    Thanks
    Venkat.O</font>

  • How to populate a dropdown box based on a selection in another Dropdown box.

    I am trying to find out a way to do the following:
    I am using coldfusion ....working on a form. The form has
    couple of dropdown boxes. Based on the selection on the first
    dropdown box another dropdown box needs to get populated with
    different options. These options will be coming from a query. I am
    trying to find out the Javascript code for doing this.
    Thanks in advance.

    jchopra,
    There's a method to doing what you're wanting to do that I've
    used extensively.
    Basically, within my code, I start by invoking the method
    that returns the data for the dropdown lists. Then, I use the
    following code to pour the data returned into a javascript array:
    var locArray = new Array(#evaluate(locs.recordcount+1)#);
    locArray[0] = new Array('','','','','','','','','',);
    <cfloop query="locs">
    locArray[#locs.CurrentRow#] = new
    Array('#JSStringFormat(locationId)#',
    '#JSStringFormat(fkyPolicyId)#',
    '#JSStringFormat(locationNumber)#',
    '#JSStringFormat(description)#',
    '#JSStringFormat(address1)#',
    '#JSStringFormat(address2)#',
    '#JSStringFormat(zipcode)#',
    '#JSStringFormat(city)#',
    '#JSStringFormat(state)#';
    </cfloop>
    Then I wrote a javascript function that is assigned to the
    first dropdown's onChange() event. When the user changes the value
    that is selected within the dropdown, I use javascript to locate
    (using the policyid) the corresponding record in the javascript
    array and populate and/or select the appropriate value(s) in the
    second dropdown.
    If the data returned from the method invocation is too large
    to use within a javascript array, you may need to limit the results
    that are returned.
    Hope this makes sense. If not, please let me know.
    ds

  • How do I populate one dropdown list based on the selection in another dropdown list?

    I have one dropdown list that has 21 choices.  Depending on the selection of those 21 choices, I have another dropdown list that will select a different subset of choices from a pool of 96 choices.  How do I get this to happen?

    I have one dropdown list that has 21 choices.  Depending on the selection of those 21 choices, I have another dropdown list that will select a different subset of choices from a pool of 96 choices.  How do I get this to happen?

  • Populating the 2nd dropdown based on value selected on 1st dropdown

    Hi,
    I know that there is a similar post about this in the forum but it doesn't actually show how an event for the dropdown is created. I believe this would be a script that is done within the form (transaction SFP) itself, but could I please have an example please?
    I did try to take a look at the standard ISR_FORM_SPTD form but there doesn't seem to be any scripts in this form.
    Thanks and regards,
    Adeline.

    Hi,
    Am not so sure, how were unable to locate this script. Click on the dropdown and check in the Script editor. You will get the same script. Anyways, here is the script.
    <i>// If the display value is used in the data DOM,
    // re-assign the corresponding data value
    if (this.rawValue != "" ) {
         if (this.boundItem(this.rawValue) != "") {
              this.rawValue = this.boundItem(this.rawValue);
    // START OF CODE - TO RUN AFTER SELECTION HAS BEEN MADE
    xfa.record.CONTROL_PARAM.ISR_EVENT.value = "CHECK";
    app.eval("event.target.SAPSubmit(false);");
    // END OF CODE - TO RUN AFTER SELECTION HAS BEEN MADE
    data.RequestPromotion[0].PCR_PAGE1.PCR_DE.PCRDEContent.NewScaleLevelDDL::ready:form - (FormCalc, client)
    //     START OF XFO CODE - DO NOT REMOVE OR MODIFY
    // If this object exists, then we are not being rendered by the XML Form Agent
    if ((Exists(xfa.host.appType)) and ($.bind.ref <> "")) then
         // Note the rawValue and try to set the selection if it is present
         // As soon as you add items the rawValue will be lost
         var CurrValue = ""
         //  Check for a null - an empty XML node will return a null
         if ($.rawValue <> null) then
              CurrValue = $.rawValue
         endif
         var Found = 0
         // the data binding may contain "$data.<root data name>" instead of $record
         var DataBinding = replace($.bind.ref,Concat("$data.",xfa.record.name),"$record")
         DataBinding = replace(DataBinding,"[*]")
         for i=0 upto xfa.record.enum_list.nodes.length - 1 step 1 do
              // Find the match.  The binding value may contain "[*]"
              // so remove them first
              var ListBinding = replace(xfa.record.enum_list.nodes.item(i).binding.value,"[*]")
              if (DataBinding == ListBinding) then
                   // the first two items are the name and binding attributes, then the list starts
                   if (xfa.host.version < 7) then  // add a dummy item to work around a bug in A6
                        $.addItem("a","-1")
                   endif
                   $.clearItems()
                   for j=2 upto xfa.record.enum_list.nodes.item(i).nodes.length - 1 step 2 do
                        // The order is assumed to be display and then data
                        // if the value is null, then add the empty string
                        if (xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value == null) then
                             $.addItem(xfa.record.enum_list.nodes.item(i).nodes.item(j).value,"")
                        else
                             $.addItem(xfa.record.enum_list.nodes.item(i).nodes.item(j).value,xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value)
                        endif
                        if (xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value == CurrValue) then
                             Found = 1
                        endif
                        if ((xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value == null) and (CurrValue == "")) then
                             Found = 1
                        endif
                   endfor
                   // Now set the selection - omitting this step means there will be no selection
                   // if there is only one item in the list and no default value, we have to select the first item - Bug in Acrobat 6.02 (fixed in Acrobat 7)
                   if ((xfa.record.enum_list.nodes.item(i).nodes.length <= 4) and (CurrValue == "") and (xfa.host.version < 7)) then
                        $.rawValue = xfa.record.enum_list.nodes.item(i).nodes.item(3).value
                   else
                        // if available, set the selection to the default value
                        if (Found) then
                             $.rawValue = CurrValue
                        else
                             // otherwise: set the selection to the first item
                             $.rawValue = xfa.record.enum_list.nodes.item(i).nodes.item(3).value
                        endif
                   endif
                   // START OF CODE - TO RUN AFTER LIST HAS BEEN FILLED
                   // END OF CODE - TO RUN AFTER LIST HAS BEEN FILLED
                   break
              endif
         endfor
    endif
    //     END OF XFO CODE - DO NOT REMOVE OR MODIFY</i>
    This should solve your problem.
    Regards
    <i><b>Raja Sekhar</b></i>

  • Populate a dropdown based on selected in another dropdown in a seperate table

    Good Day All;
    This may sound like a simple question to most, but… It has had me frustrated trying to figure out.
    I am trying to populate a dropdown based on what is selected in another dropdown.
    Let me explain what I have done so far.
    LifeCycle Designer 8.05.2
    When I had both dropdowns in the same table, I did not have a problem. The code I used is
    Table name is “Table1”
    if(directorate.rawValue == "1")
    division.clearItems();
    division.addItem("select")
    I was asked to move things around and now “division” is located in “Table2”
    I know I need to reference “Table1” but I am running into a Syntax error. I have tried the following code;
    if(Table1 Row1 directorate.rawValue == "1")
    division.clearItems();
    division.addItem("Faire un choix")
    if(Table1.Row1.directorate.rawValue == "1")
    division.clearItems();
    division.addItem("Faire un choix")
    Any help would be appreciated
    Chomp

    You're missing a semicolon at the end of the addItem line, and on the second code sample you've got no periods in the SOM reference (Table1 Row1 directorate). 
    The easiest way to get the path to another field is to ctrl-click on the field while you are in the script editor.

  • Auto populate Infopath 2013 fields after selecting a specific dropdown option.

    Auto populate Infopath 2013 fields after selecting a specific dropdown option.
    Hi.
    I have a Sharepoint 2013 list with three fields. Code, Section and Sub Section.
    I would like to be able to have the form autopopulate the Section and Sub Section fields when a value for code is entered.
    How would I go about this please?
    Thanks
    Jon

    Hi JonMorgan,
    Based on your description, my understanding is that you want to achieve that the second dropdown gets populated depending on what the first dropdown is set to.
    To achieve your requirement, creating cascading dropdown fields with InfoPath.
    Please refer to the following links about cascade drop down in InfoPath form:
    http://msreddysharepoint.blogspot.in/2012/12/infopath-2013-web-browser-creating.html
    http://www.pointbeyond.com/2011/11/20/cascading-dropdowns-in-infopath-2010/
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Lisa Chen
    TechNet Community Support

  • Infopath: How to load data in one field based on value selected in another field

    We have a drop down list field in the infopath form and we have some more fields that should change depending on the dropdown selection. 
    How can we achieve this please ?
    Thank you !

    Hi Prajk, sounds like you want to do cascading dropdowns. If so, see the link below. If you're just trying to enter information into a field (not a dropdown) based off the value of the dropdown, then set a rule so that if dropdown = "this," set
    the field's value to "this."
    http://blogs.msdn.com/b/bharatgupta/archive/2013/03/07/create-cascading-dropdown-in-browser-enabled-infopath-form-using-infopath-2010.aspx
    cameron rautmann

  • Create a filtered list based on the selection in another field? URGENT HELP NEEDED

    Hi,
    Hoping someone can help me with something I am working on. i am fairly new to creating forms in acrobat (know how to us the full range of very basic features) but I have now found myself needing some help.
    i am producing an order form, and I need to create a filtered dropdown list based on the value selected in another field.
    basically, when a user select the company chooses their Business Name from a dropdown list, I would like their deliver address to self populate. In some cases there may be a few options for the company delivery address so in these cases the second option would be a dropdown list of the options available for that company.
    i have attached a screenshot, it is the Fields "Business Name" and "delivery Address/Delivery Postcode" that i would like to be linked so that the option in Business Name filtered the options in delivery Address
    Hope someone out there has the time to help me with this, i am using Acrobat Pro DC
    many Thanks
    Lee

    This will require a complex, custom-made script. The basic functionality of populating another field based on a selection in a drop-down is not that complicated, but if you want it to also populate other drop-downs (and then presumably use them to populate other fields), it will require a more complex solutions.
    This tutorial is relevant for your question: https://acrobatusers.com/tutorials/change_another_field

  • Trying to set attribute value based on user selection of another attribute

    I am trying to set an attribute value based on the user's selection of another attribute using JSP EditCurrentRecord. When the user chooses the AreaId from the combo box I want to look up the value of the RgnID, preferrably without the user seeing this field at all. Below is my code which does not work. When I run it I get Error Message: null. Any suggestions are appreciated!!
    <jsp:useBean id="RowEditor" class="oracle.jbo.html.databeans.EditCurrentRecord" scope="request">
    <%
    RowEditor.initialize(pageContext, "MyProject2_package1_SRSecurityModule.UsrAreaWhView");
    RowEditor.setTargetUrl("UsrAreaWhView_SubmitInsertForm.jsp");
    RowEditor.createNewRow();
    RowEditor.setDisplayAttributes("OracleId, RgnId, RegionKey, AreaId");
    RowEditor.useEditField("OracleId");
    RowEditor.getFieldRenderer("OracleId").setPromptText("Oracle ID");
    RowEditor.useEditField("AreaId");
    RowEditor.useComboBox("AreaId","AreaWhView","Area","AreaKey");
    RowEditor.getFieldRenderer("AreaId").setPromptText("Area");
    RowEditor.useEditField("RgnId");
    RowEditor.getFieldRenderer("RgnId").setPromptText("Region");
    RowEditor.getRowSet().getViewObject().getCurrentRow().setAttribute("RgnId",RowEditor.getRowSet().getViewObject().getCurrentRow().getAttribute("RegionKey"));
    RowEditor.setReleaseApplicationResources(true);
    RowEditor.render();
    %>
    </jsp:useBean>

    ok, sorry everyone for making it confusing; this is what I am
    trying to acheieve;
    I would like the user to populate my database with thier
    username AND userID. I have a dropdown box with thier username
    dynamicly populated already, what I am trying to achieve, is a way
    of when the user selects thier username either another dropdown or
    a hidden field is automatically populated with the appropiate
    userID (to match thier username). Now I could just have two
    dropdowns and they select both, but i'd rather avoid the
    possibility of mismatches, and that is why I would like it to be
    automatic and based on thier username selection...
    Does that make sense....?

  • Cond display of drop down based on value selected in another drop down form

    Hi,
    I have a requirement in my app in which I need to be able to conditionally display the values in the drop down down list based on the values selected in another drop down list...
    Currently I have 2 drop downs.
    First drop down is a list of Jacks from 2000 to 4999...
    Second Drop down consists Chassis ranging from 1 to 900..
    So when a user selects any jack between 2000 - 2999, in the second drop down only Chassis ranging from 1 to 300 should appear.
    when anything between 3000 - 3999 is selected, Chassis ranging from 301 to 600 should appear..
    and for jacks between 4000 - 4999, Chassis ranging from 601 to 900 should appear in the second drop down.
    Can someone please provide me pointers on how to do this..
    Thanks,
    Nehal

    Hi Larry,
    Thanks for your response..
    Here are the queries for my select lists.
    P62_JACK
    select list query for Jacks:
    select JACK_NUM display_value, JACK_NUM return_value
    from CTS_LIST_OF_JACKS
    order by 1
    P62_CHASSIS_BLADE_PORT
    select NETWORKPORT display_value, NETWORKPORT return_value
    from CTS_LIST_OF_NETWORKPORTS
    order by NETWORKPORT_ID
    jacks range from 2000 to 4000
    chassis_blade_port ranges from 100 to 900...
    Can you please let me know how to do it..
    Thanks,
    Nehal

  • How to populate a dropdown based on the selection from a previous dropdown?

    I am currently trying to build a spreadsheet with three different dropdown menus to choose from.  Based on what is selected from the first drop down though affects what choices are displayed for the next dropdowns.  Is this possible in Numbers? Or should I look for other alternatives for what I'm trying to do.

    Dynamic dropdown (pop-up) menus is not possible in Numbers directly.  If you use scripts you may be able to cobble something together.
    If you REALLY want pop up menus then place ALL the choices in a single pop up grouped together

  • Dropdowns based on previous selection and auto populate

    Good day All;
    With any luck, this will be the final touches I will need to get this form ready for approval.
    Anyway…. This is what I am trying to do. When using dropdown lists, I would like to be able to select from a group of managers depending on what “Section” was selected. It gets a little more crazy (to me anyway).
    Example: There a 3 divisions with 1 director per division.
                     Each division has 4 or more sections with a manager for each section.
    So that being said, what I would like the user to be able to do is:
    If user selects Division “1” the “director” field will auto populate with “Director 1” name.
    Next, when the user selects a “Section” from the dropdown, they will only be presented with a list of sections that belong to “Director 1”. When they make the selection, the “manager” is auto populated with the manager’s name…….
    Please let me know if I have gone a wee bit over the deep end with this.
    I hope this made sense??? ;>))
    Thanks All
    Chomp

    Thanks both. I have been thrown a wee bit of a curve ball as the powers that be woul
    d like to rethink what this form will be used for.
    Thanks Again
    Don

  • Is there a way to auto-populate text based on a selection?

    I honestly don't even know how to word my question haha... so the title may be misleading...
    For my job I need to fill out indesign files, and at one part of the file based on the state a person is from I need to paste a specific e-mail in several places.
    Is there a way where maybe I create a dropdown menu of the several state e-mails I can choose from, and upon choosing it auto-populates that choice into the several other places?
    I guess, is there a way where if I make a select or input text into one area it will generate in the other areas as well?

    Maybe you need some kind of clipboard manager to choose several texts to paste
    http://lifehacker.com/5298615/five-best-clipboard-managers

Maybe you are looking for

  • Why are iBooks not available in Hong Kong

    The Hong Kong iBook Store resembles a desert. Why is it that commercial books are not available in Hong Kong? 

  • How to access a servlet using a blackberry?

    hello guys I have an application that runs on a blackberry and is supposed to access a Servlet on a Tomcat web server. My question is: Should I configure first Tomcat to be able to handle WAP request? If "Yes", how can I do that? Or maybe I don't hav

  • Cannot get TV to mirror mid-2009 Mac Book Pro screen

    I previously had no trouble using my TV as a mirror for my mid-2009 MacBook Pro but suddenly found I could not longer do so. Sadly I cannot remember just how I set it up originally. Advice on the web entails going to Displays in Apple Preferences and

  • Pavilion G6-2211sr Windows 7 64 drivers.

    Good day, There are no drivers in HP download section! I've just installed Windows 7 on my notebook, so I need the drivers pretty much. The only driver I've found is my ethernet Realtek Driver. Tried to download manuall AMD Display Driver (HD7000M se

  • Java e-mail link    Help.

    How do you wright Java to send and e-mail and then redirect to a new web page? I am using Web Page maker. It's a simple web designing program. The FORM fetcher for e-mail is crude. When someone fills out the e-mail form and hits SUMMIT it sends us th