RESOLVE_VAR
Use the RESOLVE_VAR script function to resolve a variable in text. The function can resolve any of the following variable types:
- PromptSet variables
- System variables
- Script variables
- VARA objects
Syntax
RESOLVE_VAR (Variable)
Parameters
| Parameter | Description | Format |
|---|---|---|
| Variable | Name of the variable or VARA object to resolve. | script literal or script variable |
Examples
An SQLI VARA object called VARA.SQLI_TEST returns version and build numbers via SQL. The following script resolves the VARA object in a string and assigns the result to a script variable.
:SET &txt# = RESOLVE_VAR("This is version {VARA.SQLI_TEST}")
:PRINT &txt#
The activation report shows:
2014-11-18 11:50:22 - U00020408 This is version 11.0.0+build.2751
The following example retrieves and resolves a variable. The value stored in VARA object VARA_RESOLVE (key 1, value 1) is the phrase this is the main key.
: SET &var# = {VARA_RESOLVE,key1,1}
: PRINT &var#
: SET &val# = RESOLVE_VAR(&var#)
: PRINT &val#
The activation report shows:
2014-11-18 17:50:32 - U00020408 {VARA_RESOLVE,key1,1}
2014-11-18 17:50:32 - U00020408 this is the main key
See also: