Any action in an action list update can have a condition assigned that controls whether or not the action is executed during the update. If no condition is set, the action is always executed.
Action conditions will take the form of an arithmetic statement and evaluate to either true or false. If the conditional expression evaluates to true, the action is executed during the update. If it evaluates to false, the action is skipped and not executed.
The expression can include a combination of values, operators and functions.
+, -, *, /, mod, >, <, >=, <=, and, &, or, |, andalso, &&, orelse, ||, xor, ^, like, =, ==, <>, !=
Not, !, ~, -
Standard operator precedence is honored.
1. -; !, not; ~
2. *; /; %, mod
3. +; -
4. >; <; >=; <=
5. ==, =; !=, <>; like
6. &, and
7. ^, xor
8. |, or
9. &&, andalso
10. ||, orelse
The following functions are supported in action conditional statements.
• Startswith(string, string). Returns 1 if the first string starts with the second string, using case-insensitive comparison.
• Endswith(string, string). Returns 1 if the first string ends with the second string, using case-insensitive comparison.
• Contains(string, string). Returns 1 if the first string contains the second string, using case-insensitive comparison.
• Substring(string, number:start, number:length). Returns text from the first string, from start (0-based) and extending for length characters.
• Append(string, string). Returns a string containing string 1 followed by string 2.
• Round(number). Returns the number rounded to the nearest integer.
• Sign(number). Returns 1 if the number is positive, -1 if the number is negative, or 0 if the number is 0.
• Int(number). Returns the integer part of the number.
• Frac(number). Returns the fractional part of the number.