User guide

The view model editor
66 Data Integration with Sybase Avaki Studio
Using expressions within Avaki Studio
Most of the operators in Avaki Studio allow you to specify expressions that are evalu-
ated at runtime in order to configure how your view model works. For the majority of
cases, simple expressions that evaluate to a single value will suffice. Some of these are
generic, while others must evaluate to a Boolean value. Studio’s more advanced oper-
ators, however, require more complex, multi-line expressions.
Simple expressions
Some examples of expressions that evaluate to simple values are:
SALARY
SALARY” is the name of a column in the single incoming result set.
Join01.LAST_NAME
“Join01” is one of the result sets that feed into the operator where the expression is
defined, and “LAST_NAME” is one of the columns in that result set.
"Name: " + toUpperCase(variables.global.UserName)
Concatenates the string “Name: ” and the value of the model parameter “User-
Name” after first converting the parameter to uppercase.)
getDoubleValue(Join01RS, 6)
Returns the value of the sixth column in the result set coming from the input called
“Join01” as a Double object.
Boolean expressions
Certain expression fields within Studio require expressions that evaluate to Boolean
(true or false) values. An example of this is for the “Where” parameter to the Select
operator. Some examples of Boolean expressions are:
PRICE > 1000
PRICE” is the name of a column in the single incoming result set. This evaluates to
“true” when the value of the PRICE column is greater than 1000.
SalesDBOP.SALES_TERRITORY == "EAST"
“SalesDBOP is the name of an input to this operator and “SALES_TERRITORY” is
the name of a field in that input. Note that when testing for equality, you need to
have two equals signs together. Here, the value evaluates to “true” when the value
in the SALES_TERRITORY column is the character string “EAST.”