Writer Guide
Apply the condition to the content
Now that you have defined the variable, you can use it in a condition
statement. This topic describes some of the possibilities.
Conditional text
First, let us set up some conditional text that will insert the words
Great Product Lite into the Lite version and Great Product Pro into
the Pro version of the manual. You would use this field whenever you
want to mention the name of the product.
1) Place the cursor where you want one of these phrases to appear.
(You can move or delete it later, if you wish.)
2) Open the Fields dialog box by clicking Insert > Fields > Other,
select the
Functions
page, and select Conditional text in the
Type
list.
3) As shown in Figure 394, type ProLite EQ "Lite" in the
Condition
box, Great Product Lite in the
Then
box, and Great Product
Pro in the
Else
box.
Note
These fields are case-sensitive, and quotation marks are
required around a text value such as Lite.
4) Click Insert to insert the field, then click Close. You should see
Great Product Lite
in your text.
Figure 394: Inserting conditional text
Tip
If you want to insert this field into your text in many places (as
you probably would for a product name), create an AutoText
entry for it. See “Using AutoText to insert often-used fields” on
page 442 for instructions.
Chapter 14 Working with Fields 457