Tuesday, 17 June 2014

Display sharepoint list data in infopath

Display sharepoint list data in infopath.
Filter sharepoint list data in the infopath.
1. Using data connection
2. Using smart object
Using Data connection:
a. Create a data connection for “receive” and give sharepoint url select list name and fields which you want.
b. Drag secondary data connection which you create for receive type in the infopath.
c. Now you will get list data.
We cannot do filtering using this way.
Using smart object
a. Enable smart object on SharePoint list.
b. Integrate smart object to infopath
c. Go to K2 studion , Go to start double click start activity
d. Go to “workflow form template” option. Click on edit.
e. Add GetList method in smart object integration. Finish.
f. Now go to infopath by click on design option.
g. Infopath toolsformoptionsopen&save
h. Add new rule, add action
i. Select set a field’s value
j. In the field option click on icon, in the data source, select smart object Getlist.
k. Go up to query fieldsmartobjectinputinput propertiesselect sharepoint url
l. In the value field enter sharepoint site URL
m. Add action; select query using a data connection select smart object getlist
n. Go to infopath view where you need sharepoint list data.
o. Go to data sourceselect smartobject getlist.
p. Goto data fieldssmartobjectreturnreturnproperties.
q. Drag the fields which you want show in the form.
r. Run infopath
Done.
Filter sharepoint list data based on input value.
After step (i) add below steps.
a. add action ,Select set a field’s value
b. In the field option click on icon, in the data source, select smart object Getlist.
c. Go up to query fieldsmartobjectinputinput propertiesselect the “field which you want filter”
d. In the value field select field form your infopath , it will pass that value as input to smart object and return the output form sharepoint list.