June 24, 2021

How to get User Information in InfoPath form using User Information List with SharePoint Online


Introduction

We recently migrated InfoPath Forms from SharePoint On-Premises to SharePoint Online for a Postal and Parcel company based out of Melbourne, Victoria, Australia. In this migration, we updated all the data connections of the InfoPath Forms for compatibility with SharePoint Online. 

So, in this blog, we will explore one of the data connections and will learn how to get User Information in InfoPath form using User Information List with SharePoint Online (Office 365).

User Information List

User information list is the SharePoint list that stores all the user information details. So, we will directly use this list and get user’s details.

Steps to get the Users information.

Step 1: Open your InfoPath form in InfoPath Designer. Open “Data Connection”, you can open data connection with two way.

1.      Open from “Data” tab

2.      Directly, click on “Manage Data Connection” in bottom right corner of the field panel.


Step 2: After opening the “Data connection”, click on the “Add” button.


 Step 3:   Once you click on the “Add” button, it will open a new “Data Connection Wizard and select “Create new Connection to:” and “Receive data” and then click on the “Next” button.  


Step 4:  Then select “SharePoint library or list” and click on the “Next” button.

Step 5: Enter your Site URL in the textbox and click on the “Next” button.


Step 6: Select the last “User Information List” from the list and click on the “Next” button.

 Step 7: It shows all user information columns. Select the checkbox based on your requirement and click the “Next” button.

Step 8: In the next window select the “Next” button.

Step 9: Next window enter your connection name, select “Automatically retrieve data when  form is opened” and click on the “Finish” button, “Connection Wizard” will be closed automatically.

                          

Step 10: In "Data Connection Wizard" a new connection will be displayed, close the window now.

Step 11: To view User Information select "User Information Connection" from the "Fields" panel.

                  Scroll drop-down and select the "User Information List".


Step 12: Then expand the "data field" and right-click on "d: SharePointListitem_Rw" folder and select "Repeating Table".


Once you select, the table appears in your form and once you click on preview, it will show all user Information.

Final Output

Here User's Full name, Login name, and ID is been displayed.

Based on your requirement, you can retrieve particular user information also, currently it will show all users.


If you have any questions you can reach out our SharePoint Consulting team here.


No comments:

Post a Comment