Chapter 9 – Using Data in Sharepoint Forms

SAM Info Path with Sharepoint 2010 – P. 123 – 02/14/2011, 06:20PM

Use Data from a Database – use data from SQL server in your form.

1. Create UDL file: open a text file, and name it SQL.udl. UDL is Microsoft data link file. Double click it and configure the database connection – a database, credential and select database.

2. Now configure the Infopath connection to use this file. Open Infopath designer, Data à From Other Sources à From Database

Select table or view

select fields. You can also add another table so you can select field from other fields. It’s a good idea to build a view before you make it a data source in InfoPath.

Note: The data file will work locally, but when you deploy the form to Sharepoint, you will have access issue. Solution:
convert the connection to a centralized data connection file. (explained next)

Convert an InfoPath Connection to a Sharepoint Connection File —

Enter the Data Connection Library URL:

Once uploaded to the DCL library, you need to approve it before you can use it. (P.131)

Use Data From a Sharepoint List —

A common data source for a sharepoint form is a Sharepoint List. If the list contains business entities and is the main repository for those items, it only makes sense to leverage them within your form.
Data à From Sharepoint List –> Enter List URL

Select a List, and fields:

Use Data From a Sharepoint Data Connection File —

InfoPath will start downloading a local copy of the connection file

The data connection file will be saved locally

Use Data from a (SOAP) Web Service —

Enter a WSDL url from an external/internal SOAP source

Select a web method

Next, provide a sample value so you can expect what data to retrieve.

Populate a Drop Down List with Data – (Page 138)
right click a drop down menu, property:

Leverage External Data from REST Web Service —

Enter the REST service address:

Drag “data” on to form, a form is created automatically.

When viewing your form, if you see this security warning

Go to File à info à Form Options

****** Change it to full trust and you can access the external resource.

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: