Scripting with Data Sources

Previous Next

You can use the following functions to script around data source objects:

DefaultDataSource contains the data source in the current page that has the Default Data Source = Yes property setting.

getValue 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.

getSearchValue is used to retrieve values from query conditions.

getDataSourceAlias is used to refer to the (USoft-generated) alias of a data source in a SQL statement.

getMainDataSourceAlias is used in the WHERE clause of a SQL statement, and refers to the (USoft-generated) alias of the main data source in the FROM clause.

getThisDataSourceAlias is used in the WHERE clause of a SQL statement, and refers to the (USoft-generated) alias of the data source itself.

getWhereClause is used in the WHERE clause of a SQL statement, and copies the WHERE clause of another data source based on the same table to the appropriate data source.

getExpression is used to copy the Output Expression of a table column to use it in other expressions.

getSelection is used in the WHERE clause of a SQL statement, and creates an expression of the selected record of another data source based on the same table.

To refer to host variables in SELECT or WHERE clause of a SQL statement, use a colon ( : ) prefix, for example:

:customer_id 

 

 

See Also

Page and Data Source Constructs

Data Sources