Set 4 text box values off the selection from a drop-down - InfoPath Dev
in

InfoPath Dev

Set 4 text box values off the selection from a drop-down

Last post 12-11-2012 01:05 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-06-2012 01:36 PM

    Set 4 text box values off the selection from a drop-down

    Using 2010

    I have a SQL view -

    SELECT
    c.ClientID,
    c.ClientName,
    p.ProjectID,
    v.VendorID,
    f.FeedID


    FROM  tbl_Clients c INNER JOIN
          tbl_Projects p ON c.ClientID = p.ClientID INNER JOIN
          tbl_Feeds f ON p.ProjectID = f.ProjectID INNER JOIN
          tbl_Vendors v ON f.VendorID = v.VendorID

     

    In InfoPath, the c.ClientName is used to populate the drop-down.  Once the client is chosen, I would like to populate the text boxes for  ClientID, VendorID, ProjectID and FeedID.

    Is this possible to do and if so, how.

     Thanks for your time and help, it is greatly appreciated.

  • 12-11-2012 01:05 AM In reply to

    Re: Set 4 text box values off the selection from a drop-down

    It would be something like the following:

    Add action rule to the dropdown box's field

    Action: Set a field's value

    Set field: VendorID (in main data source)

    Value:

    1. Click the fx button to open the formula editor
    2. Click the Select a field or group... button
    3. In the dialog, select the VendorID field from the secondary data source (but don't click OK yet)
    4. Click the Filter data... button, and set up the condition ClientName (from secondary data source) equals ClientName (from the main data source)

    Repeat the above for the rest of the fields.

    Customarily, I think it would be typical to bind the dropdown to the ClientID field, use ClientName as the display value, and ClientID as the value value.  The process above would still be the same except that you would use ClientID in the filter instead of ClientName.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.