Introduction
In one of the previous article <link here> we have seen how to make use of “Extract Rule” Type Fast Formula to derive values using
-
Extract Input Parameters
-
Other Extract Attributes
However, one major limitation of an Extract Rule Type Fast Formula is that it always returns a Text Output. What this means is that even if you had a numeric output as a result of all calcualations performed earlier it would give a corresponding text value as a output. This also implies that one would not be able to perform any mathematical operations on the extract rule output value. One alternative for this could be to use another Extract Rule Fast Formula wherein one may use the TO_NUMBER function.
Let-us demonstrate the same using a example.
Pre-requisite
We already have an existing attribute (‘LOSInDays’) defined which is based upon a Extract Rule Fast formula. We would now make use of this attribute, apply the TO_NUMBER function on this perform a mathematical operation and then return a text type value.
Fast Formula Text |
DEFAULT FOR DATA_ELEMENTS IS EMPTY_TEXT_TEXT INPUTS ARE DATA_ELEMENTS (TEXT_TEXT) ln_los_in_days = TO_NUMBER(DATA_ELEMENTS['LOSINDAYS']) ln_newhire_criteria_days = GET_PARAMETER_VALUE_NUMBER('NEWHIRECRITERIADAYS') RULE_VALUE = 'N' IF (ln_los_in_days <= ln_newhire_criteria_days) THEN ( RULE_VALUE = 'Y' ) RETURN RULE_VALUE |