Valid_Amount
Syntax: Valid_Amount(amtStr)
Argument:
- amtStr is the quantity you want to check to see if it is numeric. The argument is of type Real or Integer.
Return Type: Numeric (1 or 0)
Description: Returns 1 if the argument contains only numeric values, and optionally, sign characters (plus sign (+), minus sign (–)), and/or decimal points. Returns 0 if the argument contains any nonnumeric characters or blanks.
Example:
if (Valid_Amount(CRTRAN25.availableCredit))
then {... ;}
This example verifies that the available credit field in a data string contains a valid numeric amount. Because Valid_Amount returns a true-false value (1 or 0), the IF clause does not need to express that the result must equal 1 for the rule to execute. Rather, the rule engine evaluates the THEN clause if the function returns 1, and not if it returns 0.