You can assign a variable a simple value, a data expression,
or a JavaScript expression.
When editing the variable, you can use only the data attributes and
variables that are visible in the current context.
Procedure
- Click . In the Assignment
Editor window, click Edit. The Set
Assignment for Current Element window opens.
- Enter a value:
- To use a Simple value, click the Simple value tab,
type a value, and then click OK. For example, Header
Title.
- To use a Data expression:
- Click the Data expression tab, expand Variables,
and select the variables by clicking the check box against the variable.
- Expand Attributes, select the check box
for the appropriate attribute, and click OK.
- To use JavaScript expression:
- Click the Script expression tab, expand Variables,
and enter the JavaScript code
for the variables.
- Expand Attributes, enter the JavaScript code for the attributes, and
click OK.
Note: Script expressions preserve new lines in Rational® Publishing Engine 1.1.2
and later. Data values that contain only carriage returns can pass
conditions that could not pass in previous IBM® Rational Publishing Engine versions.
For example Object_Text != "" returns false with Rational Publishing Engine 1.1.1.2
and earlier for object texts containing only carriage returns, but
returns true in Rational Publishing Engine 1.1.2
and later.
- Click OK to close the Set
Assignment for Current Element window.
- Click OK to close the Assignment
Editor window.
Example
To select the attributes as an absolute number, name,
and value, type the JavaScript code
as:
"object:"+Absolute Number+
"attribute"+name+
"value"+_value