\ExpressionManager\ToValue(Parm)
Takes the return value from SafeRefresh and returns the current value of the expression, tag or constant. \ExpressionManager\ToValue should always be called in order to safely use the value of a parameter in a module.
Example: The Function tag uses the following to access the values of these four parameters:
RawValue =
PickValid(Cast(\ExpressionManager\ToValue(P1), 3),
Valid(P1) ?
Invalid : 0)
+
PickValid(Cast(\ExpressionManager\ToValue(P2), 3),
Valid(P2) ?
Invalid : 0)
+
PickValid(Cast(\ExpressionManager\ToValue(P3), 3),
Valid(P3) ?
Invalid : 0)
+
PickValid(Cast(\ExpressionManager\ToValue(P4), 3),
Valid(P4) ?
Invalid : 0);
If the parameter is a constant or expression, the scope resolution references to the tag-Name and tag-Value variables would be undefined. Any addition of variables, such as child tags starting or another application starting would cause the code to retrigger. This behavior is intentional in order to catch the addition of child tags AFTER the instantiation of the references to them.