Promoting InfoPath Form Fields to SharePoint columns
Understanding InfoPath Field Change Events
A field change event occurs when a form field is changed. This field change event can be consumed by any InfoPath rule and Web Service control. For example, a user may want to run a web service or set a field value when a field changes.
There are three ways to change an InfoPath field on the form in Form Workflow (formex) site:
- by an InfoPath rule
- by a Web Service
- by manually changing the field
A field change event is triggered when a field changes. This event can be used by any InfoPath rule, or used to run a Winshuttle Transaction or Query script.
When a Web services is running, if an error occurs the service stops, and any remaining services will not run. In this case, field change events only occur for those fields that have been successfully changed.
Promoting form fields as SharePoint columns allows you to export InfoPath form fields into a SharePoint column. For example, if you plan on routing a form based upon a value in a field (such as True/False, a type of request, or a material number), you will need to promote your fields.
- Create your form in InfoPath.
- Name your controls.
- From the Tools menu, select Form Options.
Note: If you are using InfoPath 2010/2013, click the File tab, and then click the Form Options icon.
- In the Category area, click Property Promotion.
- Click Add.
The Select a Field or Group window appears.
- Select the field that you want to export to a SharePoint column and click OK. The field (name) is added to the Column Name list.
- Repeat steps 5 and 6 as needed.
- Click OK to close the Form Options window.
- Save and publish your form.
Winshuttle Designer can use form fields exported as library columns to route a workflow, based on their values (data entered by the user of the form). To use a field in a form in Designer, it must be added as a Form Library Column.
In the following illustration, the form contains many fields (input controls), but only the fields added as Form Library Columns (name, file No, Owner) are available for use in Designer.
When the form is published in Designer, a corresponding SharePoint list is created with a matching set of columns that are based on the fields in the form that have been added to the Form Library Column option. Designer references these columns when they are used in a workflow.
NOTE: If you change a field name in InfoPath, it must be added to the Form Library Column option again because InfoPath does not update the Form Library Column contents.