InfoPath 2010: Showing the Display Name of a Selected Item in a Dropdown Menu in Forms Library

InfoPath 2010: Showing the Display Name of a Selected Item in a Dropdown Menu in Forms Library

Sometimes there is a need to show the selected item of a dropdown in an InfoPath form in forms library under a column. The requirement could be anything e.g. a "List View" where that column in shown, custom reporting, workflow etc.

In such cases, of course users want to see the "display names" of the selected item of the dropdown instead of ID. As we all know that when we bind a dropdown in an InfoPath Form, we have 2 fields to bind - ID and Display Name. If we promote the dropdown field of the InfoPath form as a property in the library, it will show the ID, instead of the Display Name of the selected item.

In order to meet this requirement, follow below steps to show the Display Name of the item instead of ID:

1. Create a new field in the IP form for each of your dropdown.

2. Setup a rule of 'Action' type on your dropdown as follows:

A. Set Condition : None and Action as Set a field's value.

B. In the Field box: select the field which you created newly in step#1.

C. In the Value box > click fx > click Insert a field > select the data source (secondary) which you used to bind your dropdown.

D. Select displayname and then hit Filter Data... button.

E. Click Add... button.

F. Set value 'is equal to' Your Dropdown field.

G. Hit OK on all the open dialog box.

H. Execute the form locally.

Now, when you select a value in your dropdown, you see the corresponding display name in your new field. Once it's confirmed, you can remove this field from your form so that users don't see it.

After that, promote this field so that it's shown in the library.

Hope it helps.

Thanks,
Ashish Gupta

Leave a Comment
  • Please add 1 and 8 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Ed Price - MSFT edited Original. Comment: Updated title per guidelines. Adding tags.

  • "C. In the Value box > click fx > click Insert a field > select the data source (secondary) which you used to bind your dropdown."

    Aren't you missing the part in this walkthrough where you explain that the drop-down list box has to be created with the settings "Get choices from an external data source"?

    You can just use a drop-down list box with "Enter choices manually".

Page 1 of 1 (2 items)