RESOLVEVARIABLE

The RESOLVEVARIABLE function resolves all flow variables in a given text.

A flow variable to resolve in the text is specified in the format %variable_name%. The value associated with a flow variable is a text expression that is substituted for the variable name in a given text, if defined for the flow.

A text input can have more than one flow variable to resolve, and each flow variable can occur any number of times within the text. Any variable name that cannot be resolved is returned unchanged in the text. Special flow variables (reserved or internal) are also resolved for further transformation purposes.

Syntax:
RESOLVEVARIABLE ( single-text-expression )
Meaning:
RESOLVEVARIABLE ( text_to_resolve )
Returns:
A single text expression.

Examples

  • flowlib->RESOLVEVARIABLE (“%greeting% World!" )

    If the greeting flow variable has been previously defined as 'Hello', then the text is resolved and it is returned as 'Hello World!'. If the greeting flow variable is not defined, then the function returns '%greeting% World!' .

  • flowlib->RESOLVEVARIABLE ( “Flow instance number is %_FLOWINSTANCE_% and UUID is %_FLOWUUID_%.")

    Each flow instance being run is associated with an instance number and UUID. Special variables _FLOWINSTANCE_ and _FLOWUUID_ are resolved to their values and resolved text is returned.

    For example, if _FLOWINSTANCE_ is 12345 and _FLOWUUID_ is xabcyz1234ABCxyz, the resolved text is as follows:

    'Flow instance number is 12345 and UUID is xabcyz1234ABCxyz.'

  • flowlib->RESOLVEVARIABLE (“A total of %recordcount% X12 transactions for ANSI version %version% have been processed".)

    If recordcount and version flow variables have been defined as 100 and 4050 respectively, then the resolved text returned is as follows:

    'A total of 100 X 12 transactions for ANSI version 4050 have been processed'.