How to filter SharePoint list data in Infopath form ?
To filter Share Point list data in infopath form we need a data connection between Sharepoint list and Infopath form.
In my last post I had explained about creating data connection between SharePoint list and infopath repeating table.
Please refer to http://infopathandsharepoint.blogspot.com/2014/04/display-sharepoint-list-in-infopath-form.html?showComment=1397046667518
Step 1 : Open Infopath Designer, and create a blank infopath form.
Step 2 : Create a data connection between your share point list and this infopath form, for more details please refer above link.
Step 3: Adding list data to InfoPath form
Select Secondary data source (Share Point List Data) under Fields.
Expand My Fields à Data Fields à d:Share Point List Item_RW
Drag and drop d:Share Point List Item_RW into InfoPath form, and select Repeating Table.
Your Share Point List fields will be populated in the InfoPath form Repeating table.
Select “Preview” under Home tab or Press “F5” and provide your login credentials to see the Share Point list data in Info Path form.
Step 4 : Filter List data in InfoPath form.
We need to add filter controls to this InfoPath form, so that we can filter data with respect to Gender or Application status.
Filter Share Point list data with respect to Gender :
Open InfoPath form
Go to Home tab à Controls Section àSelect Drop-Down List Box
Drop-Down field will appear in your form, and a field will be created under Main àmy Fields
Select “Drop-down list box”, right click then select “Drop-down list box Properties”.
Properties window will appear, Please select following options:
1. Select Data tab.
2. Under List Box choices, select “Get choices from an external data source”.
3. For “Value:” , select X path icon new popup will appear select “Gender” field and click “Ok”.
4. Repeat the step 3 for “Display Name:”
5. Check the check box for “Show entries with unique Display Names”.
6. Click on “Apply” then “Ok”
X Path Popup :
Select “Repeating Table”, then go to Home tab à Rules àSelect Manage Rules.
Rules window will appear in the left side of the form, Click New and select Formatting.
New condition window will appear, select the fields as shown below.
After selection of above condition, new field window will appear.
Select From the fields Drop Down select Main, and select the field (Drop Down field we have created in this form)
After selection of above condition, new field window will appear.
Select From the fields Drop Down select Main, and select the field (Drop Down field we have created in this form)
In the Rules Window, select "Hide this Control".
Step 5 :Preview Info Path form
Select “Preview” under Home tab or Press “F5” and provide your login credentials to see the Share Point list data in Info Path form.
You will see Blank form
Select Gender from Drop down, if you select Male then will get result grid as all males or for female selection result grid as females.
Note :
If any one updated list in share point, we will get updated items in infopath form.
it is dynamic filtering of sharepoint list data.
That's all about filter sharepoint list data in the infopath form.
In the next post we will see "Auto incrementing number field in sharepoint List using Share point Designer (SPD)".
PS: If you want any specific functionality of sharepoint or infopath, please let me know in the comment section below.
No comments:
Post a Comment