How to autopopulate Infopath fields using Sharepoint list data

By peter.stilgoe









1) Get your Sharepoint list into XML format

2) Set up a data connection using the above XML file as your datasource

3) Now you need to configure rules and filters on your list box. Let’s say that your list box has customer name and you wish to fill a field with the customer phone. When you set your rule, you would first select Set a field’s value then select the field where you want the phone number.

4) To filter for the correct phone number, select the formula button next to the Value field. In the formula window, select Insert Field or Group.

5) Select your secondary data source and the phone number field. Select the Filter Data button. Select Add.

6) In the first drop down, select the customer name field from your secondary data source. Leave the middle one set to Is equal to. For the third drop down, select the field on your form that is bound to the control with the customer name in it.

At this point, what you are basically telling the rule is: Go get me a phone number. I want it to belong to the same customer as the one I just selected in my List Box.

If your datasource is fairly static, when creating the data connection for the XML file in the Data Connection Wizard, ensure that the option to Include the data as a resource file in the form template or template part is selected. This will enhance the speed of your data queries to your datasource significantly.

Steps taken from Hilary Stoupa over @ InfopathDev.com

Share

, , , ,

About... peter.stilgoe

peter.stilgoeThis author published 482 posts in this site.
Sharepoint, InfoPath, K2, Nintex, Business Process Mapping, Business Intelligence, Automation, ECM, Document Management, Document Imaging, Internet Marketing & Online Business Consultant Email / MSN: pstilgoe@hotmail.com LinkedIn: Pete Stilgoe - Sharepoint Consultant









Share

FacebookTwitterEmailWindows LiveTechnoratiDeliciousDiggStumbleponMyspaceLikedin

No Comments

(Required)
(Required, will not be published)