SharePoint InfoPath Form Rules

InfoPath forms are quite user-friendly to work with. They come with lots of default setting for the user to work easily. One of those functionalities is to set Rules. Rules are set of one or more Actions, which are executed when an event gets to fire.

Rules

There are some pre-defined Rules available in InfoPath form which can be used to query or fire any action on form load, on any field like dropdown, text box etc. or on the button click.

AddRule

Types of Rules

InfoPath form provides mainly 3 types of Rules which are:

  1. Validation
  2. Formatting
  3. Action

How to add Rule?

The Rule can be added on any control either the “Add Rule” option or “Manage Rules” option. To add Rule in the InfoPath form, first, you need to select the control on which you are going to apply the Rule then in “Home” tab, you will find 2 options, “Add Rule” and “Manage Rules”. By clicking on that you will be able to set the Rule on any control of the form.

To add any Rule on any control of the form, you can use either “Add Rule” option or “Manage Rules” option but Rules on form load can only be applied by “Manage Rules” option.

Options provided in Rules

A single Rule can be applied to many fields by just copy that in the same form. If there are multiple Rules on single control then you can change the flow of the Rules by just moving them up and down. The delete option is also provided there to delete the Rule or if you don’t want to delete the Rule but also don’t want to use that Rule, you can disable the Rule as well.

ManageRules

There are 5 types of actions are provided by InfoPath form:

  • Switch views – “Switch views” action allows moving from one form to another form of the same instance of the InfoPath form.
  • Set a field’s value – Using the “Set a field’s value”, you can assign any static or dynamic value to the control.
  • Query for data – “Query for data” used to pull the data from other sources like from other lists, web method etc.
  • Submit data – “Submit data” action allow to submit the data either in Database or List or in the Form library.
  • Close the form – “Close the form” option provided to close the form on any event fire.
  • Send data to Web Part –  “Send data to Web Part” action can only be performed when a connection has been configured between the InfoPath Form Web Part and another Web Part on the page.
Action

Related Posts

Leave a comment