Rules
You can create rules to respond to and control user interaction with controls, views and forms. Use rules to create basic and complex business logic in views and forms. The different components of a rule define when (event) something happens on the view or form, if (condition) it should occur, and what (action) happens. One example is to populate a control when a view initializes (opens).
When you create or edit a rule, the Rule Designer opens with templates to define the events, conditions and actions that make up your business logic.
As you define the rule, the definition is shown on the right of the designer. Items that are underlined are configured and items that have a dotted line still need configuration.
The following sections detail the specific steps involved when you create a rule.
Steps | What it is |
---|---|
Events | Events, such as when someone clicks a button or data is changed |
Conditions | Conditions determine if and when a rule or part of a rule executes in other words when the rule will execute |
Actions | Actions defines what occurs, such as setting properties of controls, showing a message, transferring data or closing the view or form |
The rule grid groups rules together according to views, forms, subviews, subforms and unbound rules. You can create rules without events but that contain an action, called unbound rules. Hover over a rule to see the type of rule.
You can filter rules to only see specific ones. Click the filter icon and then select or deselect the type of rules you want to see.
- Form - Form-based rules, for example if a form is initialized.
- View - View-based rules, for example when a view method is executed.
- Subview - Subview-based rules, for example when a subview is initialized.
- Subform - Subform-based rules, for example when a method is executed on a subform.
- Control - Control-based rules, for example when a control on a view is clicked.
- Unbound - Unbound rules where no events are configured. These types of rules must be executed from other rules.
- Extended Only - Inherited rules that are extended.
The Extended Only rule filter applies to inherited rules. Below is an example of the Customer form which inherits a view rule. Note the icon of the view rule.
You extend the rule if you enable, disable, add, or remove rule actions or conditions. Note the rule icon of an extended rule.
Another example is when you integrate a workflow with a form, some rules are automatically extended. In the images below, the Base State is configured to start the workflow. The On Region Item, when Save Button is Clicked rule is extended in this case.
You can use search criteria to filter what you see in the rules list. When navigating back and forth between screens, and selecting another state in a form, your search criteria is maintained. Clear the search by clicking the Cancel Search and Filter icon. If you have many rules, you can use the filter and search features together to filter the results even further.
See How To: Inherit Rules Between Views and Forms for information about rule inheritance between views and forms.