Add a condition to a Field
You can apply conditional formatting to a Field. For example, this may be useful to ensure that the name of the client is always preceded by Mr., Mrs., or Ms. The following procedure explaining how to add Mr. or Mrs., depending on the addressee's gender.
- Navigate to .
-
Click the
Text Block to edit and then click
Edit in the
View and Edit pane on the right.
The Text Block Editor appears.
-
Place the cursor where you want the name of the customer to appear. From the
Fields list on the right, find and double-click the
Fields [Customer.Initials] and [Customer.Surname] if they are not there.
The Fields appear in the text.
-
Place the cursor before the [Customer.Initials]
Field and add the [Customer.Gender]
Field.
The Field appears in the text.
- Click the [Customer.Gender] Field in the text and then click the F button on the toolbar.
-
From the drop-down list, select
Condition.
For the Compare with parameter, enter M (for male).For the Use if matches parameter, enter Mr.For the Use otherwise parameter, enter Mrs.
-
Click
OK.
If the value for gender is M, the Text Block uses Mr. If the value is not M, Mrs. is used.
- Click Save & Close.
Test a conditional Field
If you applied a condition to a Field, test a Text Block it belongs to.
- Navigate to .
-
Click any
Text Block to which a conditional
Field belongs and click
Test in the
Other Actions pane on the right.
The Test window appears.
- Select the status In development and the needed Document Template.
-
Click
Edit Test Data.
The Test window appears.
- In the Customer field, enter M or F for Mr. or Mrs., as applicable.
-
Click
Test.
The document opens in Microsoft Word. Check if the conditional Field appeared correctly.
- Close Microsoft Word.