Creating your First RuleLast Updated: 07/29/2016 Introduced in Verision: 2.0 |
A Rule evaluates input data to determine whether the data matches certain conditions. The rule returns the outcome, then passes this information to a flow, form, or report. This outcome may direct which path a flow follows, or which controls display on a form, or how certain values in a report are formatted.
Rules are built in the Rule Designer. Navigate to a Designer Folder and click the Create Rule button, and select Create Rule.
Example
In the example, create a simple conditional rule that evaluates the account properties Username and Age. If the Username is not null, and Age is greater than 25, the rule will return “true”. Otherwise the rule returns “false”. The example assumes a Designer Folder already exists.
Name the rule and click OK to open it in the Rule Designer.
Next, define the input data type for the rule. The rule will accept two types of data: Username, which is a string, and Age, which is an integer.
First, build the Username input type.
In the Start Rule window, in the Rule Input Data section, click the Add button.
In the resulting pop-up, enter a name for the Username input, then click the Type selector.
Select String and click OK.
Select Int32, and click OK.
Back in the Edit object pop-up, click OK to save the input type.
Now that we’ve defined our rule’s input data, it’s time to build the rule.
In the Start Rule window click Add New Rule Step button.
Begin by clicking the Add New Rule Step button.
Expand the Number Rules category, select Greater Than, and click Next.
Since this comparison requires another value, choose Constant from the Mapping type drop-down list, and enter 25 in the Value field. Click Done.
Note that in Decisions version 3.5 and above, you’ll need to click on Test Flow to access the Debugger.
Provide a test name, and expected result.