Thursday, February 11, 2016

How to Populate and Filter InfoPath Dropdown Populating from SharePoint List


We have TimeSheet SharePoint List which has information of all the projects, their status and % Complete. We want to populate dropdown with TimeSheet projects whose status is not closed.


Populating Dropdown

First Create the List as following,

Now in the InfoPath Designer (It does not matter if it is list template or designing new InfoPath document), Add dropdown list from menu bar,

Now right click on the dropdown and set following four options,

  1. Set the option "Get choices from an external datasource".
  2. Select the data source from dropdown. In case if you have not added data connection to the TimeSheet list, please add connection to the list using "Data Connections" option in the Data ribbon in InfoPath Designer.
  3. Entries dropdown will be automatically populated.
  4. You can choose both Value and Display name as same column but i change choosen them as different columns.

Filtering Dropdown

You can filter dropdown in four steps as shown in figure below,

  1. In the dropdown control properties, click on the button next to "Entries".
  2. On the "Select a Field or Group" dialog, click on "Filter Data" button.
  3. Click on Add/Modify filter button.
  4. On the "Specify Filter Conditions" dialog, in first dropdown, i selected "select a field or group.." option which will open the "Select a field or Group" dialog. I choose project Status column from List connection. in the second and third dropdown you can choose the criteria you need.
In the next article i will write down how to populate other infopath control values based upon selection change in the dropdown (populated from external data or SharePoint list)

No comments:

Post a Comment