Use the condition editor to define a JavaScript expression
with the data attributes and variables accessible in the current context.
Procedure
- In the template content editor, double-click an element.
- In the Set Condition for Current Element window,
expand Variables and Attributes.
- Select the check box for the attribute or variable to set.
- Select values for Left operand, Operator,
and Right operand from the dropdown menus.
Note: When the left operand and right operand of a condition
are from the same attribute name, but belong to two different queries,
the condition does not work. You must set different aliases for the
two attributes for the condition to work.
- Click Add. The
selected condition is added in the text box.
- Optional: Click Test to
test the condition before applying it to the current element.
- Click OK.
Note: If you
use the tools on the Set Condition for Current Element window,
any data attribute or variable used is automatically selected in the
left pane. If you enter the condition manually, you must manually
select the data attribute or variable.
Using the Alias feature for attributes with the same
name
First edit the Document Studio preferences:
- Rational® Publishing Engine Document
Studio, click .
- Expand RPE and click RPE Document
Studio.
- In the Use Schema annotations for display field,
select No and click OK.
To differentiate attributes with the same name, you can
use the Alias feature to eliminate ambiguities. When adding the condition
which verifies that the module description equals the description
of the DOORSObject, right-click the attribute to
set the alias.
Now the Module/Object/Object Text attribute
is known as $1_Object Text and the condition can
be processed correctly.
Tip: To examine how the condition
is applied to the data, click Test. In the Test window, click Run.