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.
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,
- Set the option "Get choices from an external datasource".
- 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.
- Entries dropdown will be automatically populated.
- You can choose both Value and Display name as same column but i change choosen them as different columns.
You can filter dropdown in four steps as shown in figure below,
- In the dropdown control properties, click on the button next to "Entries".
- On the "Select a Field or Group" dialog, click on "Filter Data" button.
- Click on Add/Modify filter button.
- 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)