While working with text elements, you can conditionalize
inline pieces of text, such that they are displayed only when a
specified Expression Manager condition is satisfied. You can implement
conditions using the {<expression @value />} tag,
where the @value attribute specifies the expression
string. The content wrapped within this tag is included in the final
resolved content only if the specified expression value evaluates
to true.
Follow these steps: In the text editor, select a piece
of text—for example, Mr.—and then select Edit > Insert Condition.
Specify the condition in the Insert Condition dialog. For
example: {*gender*}=='Male'
Once
you enter this condition, the expression for the salutation, Mr.,
is automatically computed and placed in the text element:
{<expression value="{*gender*}=='Male'">Mr.</expression>}
You
can test expressions for placeholders/variables (gender in
this example) or Data Dictionary elements. An example of DDE-based
conditions follows:
{^DD_customerDD_customerGender^}=='Male'
Note: Ensure
that string values in expressions are enclosed in single quotes
(‘).
Click OK.
Additional considerations for inline conditionsKeep the following considerations in mind while working
with conditions:
|
|
|