Calculation Formulas
Back to Calculation Formulas Overview
Back to Functions Overview
Function "ToBool"
ToBool(arg)
Function: Converts the given argument into a boolean.
Can be used to convert any argument to the type boolean, which can then be used in contexts that require the type Boolean (such as boolean operators and functions that require a boolean argument).
Return-Type: Boolean
Arguments:
arg - can be of any type:
- Text: If the text is equal to "true" (case-insensitive, so for example "TRUE" or "True" are also accepted), then the result is true, otherwise the result is false.
- Number: If the number is a non-zero, positive or negative number, the result is true. If the number is 0 (zero) the result is false.
- Boolean: The result is simply the value of the argument, which is already of the type Boolean.
- Text Set or Number Set: The result is always false.
Examples:
ToBool("True")
ToBool(&IS_MEMBER;)
ToBool(0)