The getValue Placeholder

Previous Next

The getValue placeholder reads a value from the selected record in a web page. This can be a column value of the selected record, or the current value of a variable in a variable set.

It refers to the underlying data source item of a data source:

${getValue(<DataSource name>,<DataSource item>)}

 

You can use the getValue placeholder with any kind of TableDataSource or VariableSetDataSource object. The second, <DataSource item> parameter can then be a column name or a variable name of the corresponding data source.

Examples

To obtain a column value from the selected record of a data source, you can set, for example:

${getValue(SCHEDTOUR,DESTINATION)}

 

You can INVOKE a batch job with a parameter that is shown in the current web page:

 

INVOKE BatchRunner.RunJob
WITH
SELECT 'MyJob' JobName [,'<JOB_PARAMETER>='||${getValue(SCHEDTOUR,DESTINATION)} JobParameter]

 

 

NOTE: When using the getValue placeholder in a SQL statement, by default single quotation marks (' ') are added automatically around the retrieved value, according to the type of the DataSource item: A numeric type gets a single quote, and other types do not.

You can change this default behavior by adding a third, optional argument (True or False) to the placeholder to enforce or skip the addition of single quotes:

${getValue(<DataSource name>,<DataSource item>[,True|False])}

 

 

See Also

Scripting with Data Sources