Often you will need to create variables when constructing view models, particularly as the complexity of the model grows or as you use more advanced operators such as Iterator. WorkSpace Data Federation provides a JavaScript object named variables, which lets you store any variables you wish to use across multiple operators.
Refer to any variables using the following syntax to guarantee their uniqueness across your model:
variables.<operatorInstanceName>.<variableName>
The “operatorInstanceName” referred to should be the name of the operator where the variable is declared.
You can either enter variable names directly in your expressions, or you can use the expressions menu to enter the name of any downstream variable.
In the expressions that you enter, it’s OK to update variables defined downstream, as long as they’re not control variables. However:
Do not try to update variables that are defined upstream—you may see unexpected results if you change a variable outside of the operator that creates the variable. (All downstream variables appear in the expressions menu.)
If you use a control variable—a counter introduced in and maintained by an Iterator operator, for example—don’t update the control variable inside any operator other than the one that introduces it.
Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com
Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.