Introduction to Rules
SmartForms are comprised of Controls, Views and Forms, each of which may have associated Rules. Rules can be used to create basic and complex business logic in SmartForms. The different components of a Rule define what happens on the SmartForms, when it happens, and if it should occur.
The following sections detail the specific steps involved with each Wizard Step.
Wizard Steps | What it is |
---|---|
Events | Offers Templates and Events for use with Rule building |
Conditions | Stipulates the if conditions of the Rules, in other words when the Rule will execute |
Actions | Defines what should occur, or the specific actions that the SmartForms should take |
When creating or editing a Rule, the Rules Wizard opens with templates to define the events, actions and conditions that make up the SmartForms logic.
As the rule is defined, the definition is listed on the right of the wizard. Items that are in green are configured, items that are in green with a dotted line still need to be configured, and items in grey cannot be configured until something else has been set.
The Rule grid groups rules together according to Views, Forms, subviews, subforms and unbound rules. Rules that don't contain events are shown as Unbound rules. Unbound rules are essentially re-usable objects allowing users to create generic rules. For example if a standard message should be used in more than one rule, an unbound rule can be created and re-used in multiple rules using the execute another rule action.
Rules can be filtered according to the following:
- 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.
The search functionality is available in the toolbar of the Rules step of the View Designer and Form Designer. Both the rule and the location of the rule can be used to filter the results. When navigating back and forth between screens, the search will persist. However when selecting another State in the Form Designer, the search is cleared and new search criteria can be specified.
Rules can be applied to Views and Forms. See the following topics for more details: