Table of Contents |
---|
Overview
The Visual Rules Builder enables non-technical designers to add dynamic behaviors to a form/workflow. Here are several behaviors that you can create:
...
When the rule displays in the Rule Builder tab, it will indicate that the rule has been flagged to run only when the form loads, if this checkbox is checked.
Rule Builder Wizards
The Rule frevvo Rule Builder walks you through three easy steps to define your condition and actions.
Condition
...
Wizard
Describe the conditions under which a set of actions should be executed. You can specify more than one condition in the same rule but you do not need a condition.
Each condition consists of the following:
Part | Description | Example |
---|---|---|
Field or current step (Optional) | What field or current workflow step do you want to evaluate? | Select a field in your form, such as 'FirstName'. |
Operator | What condition do you want to test to see if it is true? |
Select an operator such as "is filled". | |
Value (Optional) | What value do you want to compare the Field or current step to? What function/operator do you want to use to build the expression? |
...
Let's say you select "Current Step" and "is" for the first two parts. Now select the step from the list shown: |
The left side Field and right side Value must be of a matching type. For example, you cannot use numeric expressions with text controls. If you've selected an incompatible value type, Help Mode will show an error to help you correct it.
Note |
---|
When you use the VRB "contains" condition on a checkbox control, you must set the literal value to the full, exact option value. On radio and dropdown controls, partial values work, but since the Checkbox value is an array, the rule is looking for the entire option value in the array and cannot find any partial value. For example, checkbox "C" has options "Option_1", "Option_2", "Option_3". If you use the VRB rule When C contains "1", it always evaluates to false. If you change the condition to When C contains "Option_1" the rule works as expected. |
Action
...
Wizard
Declare the actions that should be taken when the condition is true. The Functions/Operators listed above Similar to the Condition Wizard above, the wizard has three parts: Field, Operator, and Value. Functions and Operators can also be selected as the value in this wizard.
Else Action wizard
Declare the Only relevant operators will be shown based on the selected field.
Here's an example that sets the TotalDue control to the sum of the Amount controls (a table column) minus the CashAdvance control.
Else Action Wizard
Declare the actions that should be taken when the condition is false.The Functions/Operators listed above Similar to the Condition Wizard above, the wizard has three parts: Field, Operator, and Value. Functions and Operators can also be selected as the value in this wizard. Only relevant operators will be shown based on the selected field. Else Actions are optional as not all rules require them. You cannot add FALSE actions if you do not have a condition specified in the rule.cannot add FALSE actions if you do not have a condition specified in the rule.
In this example, we've set a condition that checks to see if the PeriodTo date is before the PeriodFrom date. If that is true, it sets the PeriodTo control to invalid. If that condition is FALSE, it sets PeriodTo to valid.
Built In Functions
The Visual Rule Builder (VRB) provides the following functions, no code required!
...
Function | Summary | Parameters |
---|---|---|
userFirstName | Used to retrieve the user's first name for the current user or for a specific userId. Returns the first name string. | userId - The optional userId of the user to get the first name for. This parameter an can be any text expression. If not supplied, then this function returns the first name for the current logged in user. |
userLastName | Used to retrieve the user's last name for the current user or for a specific userId. Returns the last name string. | userId - The optional userId of the user to get the last name for. This parameter an can be any text expression. If not supplied, then this function returns the last name for the current logged in user. |
userFullName | Used to retrieve the user's full name for the current user or for a specific userId. Returns the full name string. | userId - The optional userId of the user to get the full name for. This parameter an can be any text expression. If not supplied, then this function returns the full name for the current logged in user. |
userEmail | Used to retrieve the user's email for the current user or for a specific userId. Returns the email string. | userId - The optional userId of the user to get the email for. This parameter an can be any text expression. If not supplied, then this function returns the email for the current logged in user. |
userID | Used to retrieve the userID for the current user or for a specific userId. Returns the id string. | userId - The optional userId of the user to get the id for (typically not used). This parameter an can be any text expression. If not supplied, then this function returns the id for the current logged in user. |
userManagerID | Used to retrieve the user's manager's user ID for the current user or for a specific userId. Returns the manager user id string. | userId - The optional userId of the user to get the user's manager's user ID for. This parameter an can be any text expression. If not supplied, then this function returns the user's manager's user ID for the current logged in user. |
userDetail | Used retrieve individual information fields for the currently logged in user. These fields can either be one of the standard fields or a custom field configured using the (ldap) security provider. | fieldName - The name of the user information property to retrieve. This parameter an can be any text expression. The standard properties are 'id', 'first.name', 'last.name', 'email' and 'reports.to'. |
...
- Click the Run Builder button.
- Click the Add Condition button to create a new condition (optional).
- Select your Field or select current step to describe an action that will execute based on the workflow step currently executing.
- Select the Action from the dropdown.
Select the Value, expression or function(optional). To enter a text value, slide the toggle switch icon to the right and a field displays to the right.
Info If current step is selected as the condition for a workflow designed using Linked Steps, the value dropdown displays the names of the linked steps as choices. Workflows designed with individual forms as steps (not linked) will only show that step in the current step value dropdown.
For example,
- If you have one form (named form A) in a workflow, you will only see form A listed in the current step value dropdown,
- If you add 2 linked steps (named form B and form C), the current step value dropdown lists all 3 steps: form A, form B and form C.
- If you add form D (not linked) to the workflow, form D will not be listed in the current step value dropdown for form A
- Click Next to advance to the Action wizard Wizard.
- Specify the actions to be taken if the condition is true.
- Click Next to advance to the Else Action wizard Wizard
- Specify the actions to be taken if the condition is false.
- Click Finish.
- Save your form/workflow.
- Click the Save and Test icon to verify that your rule is working as expected.
...
Multiple Conditions in a Rule
The Rule frevvo Rule Builder allows you to create a rule that has more than one condition. You can write a rule that performs actions based on the values of more than one field. As you select conditions, a logic expression is built and displayed at the bottom of the screen. Notice the expression uses the AND operation by default. There may be business rules that require a change to the logic expression.
...