getting 2 values from one drop down - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

getting 2 values from one drop down

Last post 08-10-2004 08:53 AM by Greg Collins. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-29-2004 05:40 PM

    getting 2 values from one drop down

    The following is modified for simplicity but i'd like to achieve the same outcome:
    I have a drop down menu. The display is a column of a database (Last_Name)
    I have 2 other columns that i'd like to fill text boxes with from the data in the row of the table. The 2 values I want to set for the drop down box are (First_Name) and (Middle). These 3 columns are exported XML from an Access table:

    |Last_Name | First_Name | Middle |
    |Brown | Joe | T |
    |HAwk | Ace | A |
    |Hull |John | J |
    |Mack |Steve |H |

    The drop down will reference from the Data source the values of Last_Name, and fill 2 separate text boxes to the right of the drop down. This also must be in a **repeating section** so I can do a few names at a time. How can I go about doing such a task?

    This is the simplified version, but I need these values to fill 2 separate text boxes but I'm doing some calculations. I think by displaying it this way it makes it easier. Can someone help me? Is it Jscript? or something else.
  • 07-29-2004 11:03 PM In reply to

    Re: getting 2 values from one drop down

    You can use a simple filter for the first name and middle name dropdowns to set their values to be equal to the sibling nodes of the last name element when the last name element changes.

    Dbl click on the 2nd and 3rd dropdowns. You will have them bound to a secondary data source. Clicking on the binding button to the left of the datasource radio button will give you a select dialog with a filter button. Click on the filter button and add a rule to set the middle name equal to the middle name for the same node as the first name field.

    I think Greg also posted an example on this recently.
    Patrick Halstead
    Project Manager at Qdabra
  • 07-30-2004 06:20 AM In reply to

    Re: getting 2 values from one drop down

    The only problem with this is that I have 1 drop down total and it's for Last_Name and I want to reference the row of the "Access-exported" table to 2 TEXT BOXES. I want First_Name and Middle to the boxes to the right.

    I can do 1 text box, but when I want to do another text box, the Last_Name drop down can't hold more than 1 value(of course). I was wondering if there was a way for the drop down to unload 2 values from the middle and Last columns in the table using the Drop down to identify the row.
    Can you help or is there no way to do what I'm talking about
  • 07-30-2004 12:04 PM In reply to

    Re: getting 2 values from one drop down

    It sounds like what you want to do is just populate a couple of fields based on the value of a drop-down list box.

    If this is the case, please take a look at the Example title, "Populating Fields After Selection". It should show you how to do what you want -- It's using SQL as a secondary data source, but you can just as easily change it to an XML secondary data source.

    Greg Collins [InfoPath MVP]
  • 08-09-2004 12:42 PM In reply to

    • mblain
    • Not Ranked
    • Joined on 08-09-2004
    • Posts 1

    Re: getting 2 values from one drop down

    Greg, does your sample use the OnAfterChange event? With SP1, you don't need that at all, you can just set the 'default' value to the right formula and the fields will update automatically. (Default is in quotes because with this new feature it's now misnamed, it's really the 'live' value or something like that.)

    You can see a sample at
  • 08-10-2004 08:53 AM In reply to

    Re: getting 2 values from one drop down

    Actually I'm using rules to set each of the values in this particular example.

    The default value is another great way to go though! Thanx for sharing the example.

    Greg Collins [InfoPath MVP]
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.