When designing a form, you can create a rule that automatically switches views (view: A form-specific display setting that can be saved with a form template and applied to form data when the form is being filled out. Users can switch between views to choose the amount of data shown in the form.) when the form is opened or submitted, or when a button is clicked.
You can add multiple actions for each rule. For example, you can automatically open a new form and display a dialog box message when a field's value exceeds 100.
- In design mode, do one of the following:
In the Rules dialog box or on the Rules tab, click Add.
In the Name box in the Rule dialog box, type a name for the rule.
To specify when the rule should run, click Set Condition, and then enter the condition. The rule will run when the event specified in step one occurs and the condition specified in this step is met.
Click Add Action.
In the Action list in the Action dialog box, click Switch views.
In the View list, click the view you want to switch to.
If you want to prevent any rules from running after this rule (for the current event), select the Stop processing rules when this rule finishes check box in the Rule dialog box.
- To run the rule when the form is opened, click Form Options on the Tools menu, click the Open and Save tab, and then click Rules.
- To enable the form's default submit command to run the rule, click Submitting Forms on the Tools menu, and then click Enable Submit commands and buttons. In the Submit to list, click Custom submit using rules, and then click Rules.
- To run the rule when a button is clicked, double-click the button, click Rules and Custom Code in the Action box, and then click Rules.
Note The information in this topic may not apply if you are working with a form designed using Microsoft Office InfoPath 2003 without the service pack installed.