Conditional Paragraphs are used to display entire paragraphs conditionally based upon a test of your data source. You can set up as many conditions as you would like to customize what information is displayed for specific values that might reside in your data source. These elements are incredibly useful for displaying entire paragraphs of content depending on your data.
Insert Conditional Paragraph
1. To insert a Conditional Paragraph, 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 Paragraph option.
Figure 2: The contextual menu options for the Dynamic Section button.
3. From the Conditional Paragraph 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 Paragraph 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 artist attribute contains the name Dolly Parton.
5. Once you have configured your condition, select Save. You will now see the condition you created listed on the Conditional Paragraph 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 Paragraph 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 Paragraph Options
After you have inserted your Conditional Paragraph into your template you will have a few options for formatting and editing the dynamic section.
• | By right clicking on the Conditional Paragraph, 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 Paragraph.
• | 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 Paragraph you wish to edit. |