Create conditional sections for a modern template in Microsoft Syntex
When you create a modern template, you can specify which parts of a document will be included and under what conditions. This lets you control which sections of the template will be included when you generate a document.
Create a conditional section
Before you can create a conditional section, you first need to create form fields in the template. Then, follow these steps to create a conditional section.
In the document, select the block of text for which you want to specify the condition.
On the Set up the template panel, select Conditional section.
On the New conditional section panel, in the Name box, enter a name that reflects the content you've selected. (For this example, we named it Compensation Section.)
Select Next.
Set conditions
You can add conditions to specify whether this section of the template will be included in the final generated document.
For this example, we want to show the selected content for two conditions: if the fees are greater than zero and if the nature of employment is full time.
To add the first condition
On the Set condition panel, from the Choose a field dropdown list, select the appropriate field. (For this example, we selected Fees.)
From the Choose a condition dropdown list, select the appropriate condition. (For this example, we selected greater than.)
In the Enter a value box, enter the appropriate value. (For this example, we entered 0.)
To add additional conditions
On the Set condition panel, select + And or Or, depending how you want the additional condition to be linked to the first condition. (For this example, we chose And.)
On the Set condition panel, from the Choose a field dropdown list, the appropriate field. (For this example, we selected Nature of Employment.)
From the Choose a condition dropdown list, select the appropriate condition. (For this example, we selected exact match.)
In the Enter a value box, enter the appropriate value. (For this example, we entered Full Time.)
When you're done entering conditions, select Save. The new field is displayed in the Set up the template panel and shows the conditions based on which this section will be included in the final document.
Edit a conditional section
To edit the conditions in a conditional section, you can use either of these two methods:
Select the +1 more condition hyperlink, which takes you to the Set conditions page.
Select the three dots, and then select Edit.
Note
- Currently, you can create conditional sections around text and complete paragraphs. Conditional sections around images and tables is not yet supported.
- You can't add nested conditions. To achieve nested conditions, you'll need to create conditional sections around every section and specify all the required conditions.