Conditional Text sections allow you to add inline text dynamically based upon a conditional test on your data source. This useful section will allow you to build your Document Template to be targeted for specific occurrences in your data source.
Insert Conditional Text
1. To insert a Conditional Text, select the Dynamic Section button from the Insert group in the Tool Bar.
Figure 1: The Dynamic Section button is highlighted in the tool bar.
2. From the resulting contextual menu select the Conditional Text option.
Figure 2: The contextual menu options for the Dynamic Section button.
3. From the Conditional Text window, you will need to select the Add new condition button, to create a condition to be met. NOTE: Here you will also be able to toggle on or off the option to have a fallback section if none of the options are met.
Figure 3: The Conditional Text window with fallback section toggled on.
4. Using the Create Condition window you will need to build your condition.
a. From the Data Representation section you will need to select the element from your data source you would like set the condition for.
b. From the Conditions section select what you would like your condition to be based on, occurrence, numeric value, or text value.
c. From the Select Condition Description section you will need to select what the condition will be true for. NOTE: These options will be different depending on the condition option you selected.
Figure 4: Created a condition to check if the price of the CD was greater than 10.
5. Once you have configured your condition, select Save. You will now see the condition you created listed on the Conditional Text window. From here you can repeat the steps 4a-4c to create as many conditions as you need. Once you have configured all of your conditions, select OK.
Figure 5: The Conditional Text window with the newly created condition.
6. You will notice that in the Design Surface, place holder text for each of the conditions that you set. You will now need to replace this placeholder text to add your desired content to be displayed if this condition is met.
Figure 6: Place holder text shown for the set condition and the fallback section.
Conditional Text Options
After you have inserted your Conditional Text section into your template you will have a few options for formatting and editing the dynamic section.
• | By right clicking on theConditional Text section, a contextual menu is shown where you will have the option to edit or delete the condition or the entire section. |
Figure 6: The contextual menu shown when right clicking on the Conditional Text section.
• | Selecting the Edit Section option will allow you to make edits to the entire section like adding or removing the fallback and conditions, you will also be able to reorder the conditions as you see fit. |
• | You will also be able to edit the condition by simply double clicking in the Conditional Text section you wish to edit. |