Editing the value of a variable

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

  1. Click Data > Edit Assignments. In the Assignment Editor window, click Edit. The Set Assignment for Current Element window opens.
  2. 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:
      1. Click the Data expression tab, expand Variables, and select the variables by clicking the check box against the variable.
      2. Expand Attributes, select the check box for the appropriate attribute, and click OK.
    • To use JavaScript expression:
      1. Click the Script expression tab, expand Variables, and enter the JavaScript code for the variables.
      2. 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.
  3. Click OK to close the Set Assignment for Current Element window.
  4. 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

Feedback