Skip to main content

SharePoint Ninja

Go Search
SharePoint Ninja
  

TechElixir > SharePoint Ninja > Categories
User list via people web service in infopath
Note: This uses the User Information List (a hidden list in SharePoint that can be unhidden). It only lists people that have actually been to your site.
 
Inside of Infopath
 
1. Go to Design Tasks
2. Click on Data Source
3. Click on Manage Data Connections...
4. Once you are in the Data Connections Dialog box click Add
5. Choose Create a new connection and select Receive
6. Click Next
7. Choose Web Service
8. Click Next
9. Enter the url of the people.asmx web service (i.e. http://yoursite/_vti_bin/people.asmx)
10. Click Next
11. Choose Search Principals from the Select an operation: box.
12. Click Next
13. You are going to want to set the values for parameters.
14. tns:searchText should be your domain with a \ behind it (i.e. domain\)
15. tns:maxResults* should be a number greater than the results (i.e. 1000)
16. tns:PrincipalType should be the word User
17. click Next
18. click Next and then click Finish
19. Now you can click Close to close the Data Connection Dialog Box
20. Place a Drop-Down List Box on the form.
21. Under List box entries choose Look up values from an external data source
22. Choose SearchPrincipals as the data source.
23. Click on Entries
24. Expand until you see Principal Info and choose it
25. Choose DisplayName for DisplayName  and whatever field you want for Value (i.e. AccountName or DisplayName)