Rules Shorthand Syntax
When defining the business logic for a rule to fire, a value is entered into the decision table. This causes the rules engine to compare the value entered in the decision table with the field specified in the column header.
The default comparison (a.k.a. operator), is equality. For example, if the column field is gender with the choice of "male" or "female", if you enter "male" and a user submits a form where gender is equal to "male" the rule will fire.
You you wanted a comparison (operator) other than equals, you can enter is before the value. For example, if the column field is age, you could enter <50. If the user submits a form with a value of age less than fifty, then the rule will fire.
Do not surround text values with quotes.
If you enter a value in more than one column for a given row (rule) each of the comparisons must be true in order for the rule to fire. In other words, the values are logically ANDed.
Do not confuse the Rules Short Hand Syntax with the Healix Expression Grammar. The rules syntax is further simplified and always assumes a comparison will be provided. The Healix Expression Grammar can compute an arbitray calculation and is not necessarily a comparison.
Field Types and Accepted Values and Operators
The field type being compared determines what values and operators are acceptable.
Boolean
Boolean fields (fields with only a true or false, on/off values) only accept equality operators.
You may enter
Field Type | Operators | Values | Notes and Examples |
---|---|---|---|
boolean | = | yes, no, true, false | = is not required |
text | =, !=, in, notIn | any | Generally rules referencing text fields are highly discouraged because users can enter anything. Use a choice, boolean or number instead. Examples:
|
choice | = | any value that is defined for the field being compared | = is not required |
choices | = | any value that is defined for the field being compared | = is not required |
number | <=, <, >=, >, =, != in, notIn, range, !range | numbers, lists of numbers, ranges | Examples:
|
array | in=, notIn=aaa | any value that is defined for the field being compared | |
any | null | there is no value |
Date comparisons are not supported. Support for dates will be added by adding Expression column types. Thus you can compute the difference between two dates in a column to compute a duration and then use the number operator.