lr.eval_string

Returns the string argument after evaluating embedded parameters.

JavaScript

function lr.eval_string(  instring  )

VBScript

Function lr.eval_string(  instring  )
String and Parameter Functions

Arguments

NameComments
instringThe string to evaluate.

The lr.eval_string function returns the input string after evaluating any embedded parameters. If the string argument contains only a parameter, the function returns the current value of the parameter.

Embedded parameters must be in brackets.

Return Values

Returns the value of the specified string. On failure, returns NULL.

Parameterization

All input arguments can be parameterized using standard parameterization.

VBScript Examples

Example 1 - Simple Parameter Substitution

lr.message " Track Stock : " + lr.eval_string("<STOCK>") 
lr.message getStockValue( lr.eval_string("<STOCK>") )

Example 2 - Multiple Parameter Substitution

lr.save_string "Wickham", "duty_officer"
lr.save_string "swing", "shiftName" 
lr.output_message _
	(lr.eval_string _
	    ("The duty_officer for the <shiftName> shift is <duty_officer>."))
Example: Output: The duty_officer for the swing shift is Wickham.