This expression uses the SUBSTR function to determine whether the first two characters
from VALUE evaluate to the string value "11". If VALUE is a string, the expression
works fine. However, if VALUE is numeric, then the expression generates an error
condition. For a numeric, you must convert the value to a string before passing it to the
SUBSTR function. The following modification uses the CATS function to perform the
type conversion when necessary:
if(substr(cats(value, 1, 2)) = "11")
Conditional Logic
GTL supports conditional logic that enables you to include or exclude one or more GTL
statements at run time:
IF ( condition )
GTL statement(s) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.