Editing the value of a variable

You can edit a variable to use 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

  1. Click Data > Edit Assignments. In the Assignment Editor window, click Edit.
    The Set Assignment for Current Element window opens.
  2. To use a Simple value, click the Simple value tab, type a value, and then click OK. For example, Header Title.
  3. To use a Data expression:
    1. Click the Data expression tab, expand Variables and then, select the variables by clicking the check box against the variable.
    2. Expand Attributes, select the check box for the appropriate attribute, and then click OK.
  4. To use Javascript expression:
    1. Click the Script expression tab, expand Variables, and then, enter Javascript code for the variables.
    2. Expand Attributes, enter Javascript code for the attributes, and then click OK.
    Note: Script expressions now preserve new lines: Data values that contain only carriage returns will pass conditions that could not pass in the previous IBM Rational Publishing Engine version. For example Object_Text != "" returned false with IBM Rational Publishing Engine 1.1.1.2 and earlier for object texts containing only carriage returns but returns true in IBM Rational Publishing Engine 1.1.2.

Example

To select the attributes as absolute number, name, and value, type the Javascript code as:

"object:"+Absolute Number+
"attribute"+name+
"value"+_value

Feedback