Operator codes are used within a formula to change the contents of input variables. Clarify supports the use of the following:
By default, a statement containing no result operator will have its result assigned to the formula’s internal final result field, @ or result.
Some operators have both a code and a text equivalent – within a formula, you can use either, or both. For example, for concatenation, both A || B and A cat B are valid. You can also mix codes and text in the same formula.
About Variables
Variables can be a single letter or a whole word. You do not need to use a, b, etc. They can be h or total, etc. Once you define a variable, however, they must match that case every time you use them.
H, h, total, and toTal would be four unique variable names.
The only letter you cannot use is lowercase p. The lowercase variable p (standing alone, with blank spaces on both sides) is reserved and should not be used in a formula as a variable. However, word variables can contain the letter p.
For example, profit and shipment are both safe to use.
Special Values
The following lists have the values or operators you would type in bold followed by a hyphen and a description of the operator's meaning. For example:
ZERO - numeric 0
ZERO is what you would type in the formula.
eq or == - equals
eq or == are what you would type in the formula.
result or @ - final result/value returned from formula
EMPTYSTRING - empty string node
BLANK - no value
TRUE - boolean value true
FALSE - boolean value false
ZERO - numeric 0
ONE - numeric 1
YES
NO
Structure
if or ?
then or :
else or ;
end or #
, - statement separator
( - start of operator precedence override
) - end of operator precedence override
The precedence overrides the same way parenthesis would set precedence in a math equation.
For example, suppose a is 1, b is 2, and c is 5.
a + b * c using 1 + 2 * 5 results in 11.
However, ( a + b ) * c using ( 1 + 2 ) * 5 is explicit, and will always result in 15.
Operator precedence overrides can also be used to surround comparisons for easy of reading.
String Operator Codes
cat or || - concatenate
Numeric or String Operator Codes
eq or == - equals
ge or >= - greater than or equal to
gt or > - greater than
le or <= - less than or equal to
lt or < - less than
ne or != - not equal to
= - assignment
+ - add
- - subtract
* - multiply
/ - divide
\ - remainder
Joining Multiple Statements in the Condition Part of an If
and or & - and
or or | - or
Special Operator Codes
exists
does_not_exist
has_content
has_no_content
starts_with
ends_with
contains
extract_after
extract_before
length
normalize_space
has_children
does_not_contain
does_not_end_with
does_not_start_with
Comments
0 comments
Please sign in to leave a comment.