The getExpression Placeholder

Previous Next

The getExpression placeholder copies the Output Expression property from a TableColumn object.  It can be used in the Where Clause property of a data source, or in the Output Expression property of a TableColumn object. It refers to the underlying data source item of a data source:

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

 

You can use the getExpression placeholder with any kind of TableDataSource object.

The second, <DataSource item> parameter can be a column name or a variable name of the corresponding data source.

To obtain the output expression from a column of a data source, you can set, for example:

 ${getExpression(SCHEDTOUR,DESTINATION)}

 

The result of this expression is either the data source alias and column name from the data source item if it is an actual table column, or its expression as set in the Output Expression property. This allows referencing of a formula specified in that data source item in a WHERE clause possible, without requiring to copy the entire formula.

For example, you have a data source named RECORDS with a data source item named TOTALS with the following expression set in the Output Expression property:

 VALUE_FIRST + VALUE_SECOND

 

Now, you can use it in a Where Clause property like:

 ${getExpression(RECORDS, TOTALS)} > 50

 

The Page Engine translates this to:

 t1.VALUE_FIRST + t1.VALUE_SECOND > 50

 

 

See Also

Scripting with Data Sources