Creating your First Rule
  • Updated on 24 Sep 2019
  • 1 minute to read
  • Print
  • Dark
    Light

Creating your First Rule

  • Print
  • Dark
    Light

Overview

A Rule evaluates input data to determine whether the data matches certain conditions. The rule returns the outcome, then it can pass this information to a flow, form, or report. This outcome may direct which path a flow follows, determine which controls display on a form, or how certain values in a report are formatted.

Example

In the example, create a simple conditional rule that evaluates the account properties Email and Age. If the Email is not null, and Age is greater than 25, the rule will return true. Otherwise, the rule returns false.

To create the rule, navigate to a Designer Folder and click the Create Rule button. Select Create Rule.

2019-09-24_162812.png

Name the rule and select Create to open it in the Rule Designer.

2019-09-24_162904.png

Next, define the input data type for the rule. The rule will accept two types of data: Email (string) and Age (int32). First, build the Email input type.

In the Rule Designer, select Setup Input Data.

2019-09-24_162917.png

In the resulting dialog, enter a name for the "Email" input, then in the Type drop-down menu, select String. On the next line add "Age" and choose Int32 as the Type.

Select Close to save and close.

2019-09-24_162948.png

Now that the rules input data is defined, it's time to build the rule.

First, build the condition that the user name value is not null. Choose Select Data Element pick Email [String] and select Next.

2019-09-24_163004.png

Expand the Text Rules category, select Is Empty and click the Not checkbox. This condition says that the username is not empty. Select Done.

2019-09-24_163034.png

To add another condition select Add New Rule Step.

2019-09-24_163100.png

Choose Select Data Element pick Age and select Next.
Expand the Number Rules category, select Greater Than, and click Next.

2019-09-24_163207.png

Since this comparison requires another value, choose Constant from the Mapping type drop-down list, and enter "25" in the Value field. Click Done.

2019-09-24_163221.png

The rule is complete. To test the rule, select Debug.

2019-09-24_163240.png

The rule needs data to validate so enter an appropriate age and user name in the Default Input section and select Run Capturing All.

2019-09-24_163311.png

The rule runs and the outcome displays. The first condition evaluates as true while the second evaluates as false, making the entire rule have a false outcome.

2019-09-24_163321.png

Was this article helpful?