Populate a text box with Display Name from Drop Down List - InfoPath Dev
in

InfoPath Dev

Now you can find InfoPathDev on YouTube and Twitter!
Find Qdabra on Facebook

Populate a text box with Display Name from Drop Down List

Last post 07-06-2009 03:24 PM by tweeter77. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-02-2009 11:48 AM

    Populate a text box with Display Name from Drop Down List

    Hello,

    I have a drop down list w/ data pulled from a Sharepoint Contacts List.  I'm pulling the email address but displaying the full name.  I want to have the Display Name (full name) from my Drop down list populate a separate text box.  I want it to update continually as the user changes the drop down list choice.  I know there is a way to do this using rules/formulas but I don't know specifically how to set that up.  Can anyone help?

    Thanks,
    Aaron

  • 07-02-2009 02:14 PM In reply to

    Re: Populate a text box with Display Name from Drop Down List

    If you don't actually need the email address in the dropdown, then put Full Name in the Value field.  If you DO need that email address for other reasons, then set the default value of your other text field to this statement:

    Set Field's Value:

    NameField

    Contacts(Full Name) where (filter) Contacts(email_address) equals PulldownField.

    You're basically telling your text field to default to the Full Name of the person in the contacts list where the email address in the contacts list equals the email address in the form (the one chosen in the pulldown).

  • 07-02-2009 03:16 PM In reply to

    Re: Populate a text box with Display Name from Drop Down List

    Thanks for your help, warrtalon.

    What you are saying makes sense to me but I must be inputing it wrong somehow.  I am setting the default value to the Namefield and contructing the formula the way you have stated but I am getting an error.  I insert Contacts (Full Name) then go to insert Contacts (email_address) and choose "Filter..", then make it = to the PulldownField.  Any idea what I am doing wrong?

    Thanks,
    Aaron

  • 07-02-2009 04:01 PM In reply to

    Re: Populate a text box with Display Name from Drop Down List

    Ok, do it like this:

    1. Create FullName data element in your main data source as a Text field
    2. Drag element to form canvas (creates text box)
    3. Double-click that box for it's properties
    4. In the Default Value area, click the fx button
    5. In the function builder, select "Insert field"
    6. On the data source screen, choose your SECONDARY data source that comes from the Contacts list
    7. Drill down and SINGLE-CLICK the FullName node (or whichever node you're using for full names)
    8. Click filter while FullName is highlighted
    9. In the first pulldown, select the Email_Address field from the secondary data source
    10. Set the operand to "is equal to"
    11. In the last field, select the data element from your main data source that is bound to your dropdown
  • 07-06-2009 03:24 PM In reply to

    Re: Populate a text box with Display Name from Drop Down List

    Thanks again.  Works great.

     Aaron

Page 1 of 1 (5 items)
Copyright © 2003-2010 Qdabra Software. All rights reserved.
View our Terms of Use.