Receiving Data from SharePoint Lists and Business Connectivity Services
- 10/15/2011
Data Connection Libraries
Data connections from SharePoint lists generally work great in either InfoPath filler or browser forms. However, using data connections in browser-enabled InfoPath form templates introduces some potential management and authentication challenges that can be addressed by simply converting your data connections in InfoPath to Universal Data Connection (UDC) files. UDC files abstract the data connection information from the form template and place the connection information in a special SharePoint library called a Data Connection Library (DCL), as shown in the following illustration.
InfoPath 2010 uses data connections that adhere to the UDC file type. They have either a .udcx or a .xml file extension. You can connect to various types of data sources with UDC files, which are stored on the SharePoint server and then used as data connections in your form templates. Using a UDC file in a Data Connection Library offers several potential benefits, including the following:
You can publish a form template that can access data sources in a different security domain (that is, another server). This is a very useful capability because browser form authentication can be very challenging when crossing security domains.
It will be easy for you to configure data connections that work in both the InfoPath Filler client and in InfoPath Forms Services.
You can easily modify the UDC file to redirect data connections to new or updated data sources without modifying all the forms that reference the UDC file. This is much easier than having to go back and update every form template.
Last but definitely not least, you can have a single place to publish data connections that can be shared across multiple forms and even multiple servers. Think of a common data source you might use in your business that might be useful in many different forms—perhaps a list of department names, job titles, store locations, and so on. It would be much easier to maintain the data connection and security settings in one location for this type of information. All the forms in your business that need that information can reference one UDC. Combining a UDC file and a Data Connection Library is an excellent strategy for simplifying large or complex form environments.
The process for adding a UDC is actually quite simple. First, you need to have a Data Connection Library set up in SharePoint. Assuming one is in place, you add your data connection in InfoPath as usual. In the Manage Data Connection dialog, you simply use the Convert To Connection File button, which will walk you through a wizard to convert and save your connection as a UDC file.
You will need to provide the location of the Data Connection Library in SharePoint. In the following screenshot, we are publishing the data connection as a UDC file named Pilots.udcx to a library named Pilot Information.
After you have done this, you can reuse the data connections in other new forms, by using the From SharePoint Server button on the ribbon’s Data tab.
Next, browse for UDC files in Data Connection Libraries, and then pick the one you need for your new form.
Now your new form can use the data from the Pilots Name SharePoint list data connection that you created in the previous exercise. However, it’s now stored in a centrally managed Data Connection Library, and all your forms that require this information can reference a single UDC file for their data.