mscrm-addons.com logomscrm-addons.com logo
  • Release History
  • Knowledge Base
  • Documentation
  • Contact Support
  • Release History
  • Knowledge Base
  • Documentation
  • Contact Support
home/Knowledge Base/Template Designer(DCP)/How to insert Condition Fields in DocumentsCorePack Templates designer

How to insert Condition Fields in DocumentsCorePack Templates designer

9339 views 13 Updated on January 30, 2025

Conditions allow you to define content that is either displayed or removed from the final document based on a certain condition (for example field values in Dynamics 365).

This step-by-step description explains how to set conditions in our DocumentsCorePack (DCP) TemplateDesigner. In this example, we want to create a quote and choose between “Mr” and “Ms” depending on the gender of the recipient.

This webinar also covers this topic in detail.

Please note: As well as the method described in this article, Microsoft Word also supports conditions inside documents that can alternatively be used.

Step 1. Create a quote template

First, you must create a new template or open an existing one. Once the Word template is open, click the ❶ www.mscrm-addons.com tab on the top of the Word ribbon and ❷ press Insert MailMerge Fields to open the TemplateDesigner on the right side. More information about how to create DCP templates can be found here. Select the  ❸ Insert Field button.

Please note: Set the cursor ❹ at the position where you would like to insert a condition field. In our example, we want to set the condition in the subject line after “Dear” choosing between “Mr” and “Ms” based on the recipient, as you can see below.

Quote template
Figure 1: Quote template

Step 2. Use the Condition field option


Press the ❸ Insert Field button. Select Insert Computed Item and then Condition field.

Insert Condition field
Figure 2: Insert Condition field

Step 3. Configure the setup of your condition fields


The Condition Field window opens. For further steps:

❶ Give your condition a descriptive name. It makes it easy to re-use existing conditions in a template.

❷ Enable the creation of an ELSE block and define the layout of the inserted condition fields, which in in this case is next to each other.

❸ Use the condition designer to create your condition. In this example, we want to create the condition for the entity Potential Customer (Contact). We want our condition to choose between “Mr” and “Ms” depending on the gender of the recipient. Therefore, we select in the first drop-down menu the field Gender and the operator as equals. Depending on the data type of the field, you have an additional control that opens a new dialog to select the compare value, which in this case is male. A more detailed description of the condition designer can be found here.

How to insert Condition Fields in DocumentsCorePack Templates
Figure 3: Configure your condition

In your template, you can see placeholders for the formatting options next to each other. Because you selected to insert an ELSE block, you have the second placeholder, as you can see in the figure below.

How to insert Condition Fields in DocumentsCorePack Templates
Figure 4: Appearance of the fields in the template

Step 4. Set your custom text block


Within these placeholders, you can now enter the content of your conditions. In this example, IF Gender equals to Male it should display “Mr” and ELSE “Ms“.

The "if and else" block filled with content.
Figure 5: if and else block filled with content

Step 5. Save your template


Before you can use or test your template, you must save it. Use the Save Template option of the DocumentsCorePack TemplateDesigner to publish the template to Dynamics 365.

How to insert Condition Fields in DocumentsCorePack Templates
Figure 6: Save Template option

Step 6. Test your template


As you make changes to your template, you may want to test them quickly. A step-by-step description of how to test your template can be found here. Below you can see the result of our created template containing the set condition (highlighted). 

How to insert Condition Fields in DocumentsCorePack Templates
Figure 7: Result of your condition field

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.

Was this helpful?

13 Yes  7 No
Related Articles
  • Debugging the Template Design Office Add-In 
  • Introducing the DocumentsCorePack Template Designer Office Add-In
  • Ensuring correct time zone display for DateTime fields
  • How to compare a date-fields with the current date 
  • Create a template for XML or plain text
  • E-Invoicing with DocumentsCorePack
Latest Articles
  • Locating Raw Inputs and Outputs in Power Automate
  • Step by Step: How to execute an OCA in a Power Automate flow 
  • The Hidden Cost of CRM Storage — And How to Eliminate It 
  • Recap: Nordic Summit 2025
  • The new Template Designer Office Add-In
Popular Articles
  • DocumentsCorePack Template Designer – Getting Started
  • Step-by-Step: How to configure a One-Click-Action
  • Application Access for Dynamics 365
  • How to find your environment’s unique name in Microsoft Dynamics 365
  • How licenses are counted
Top Rated Articles
  • “Undefined”-labels in Chrome and Edge 114 and higher
  • Important information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack Connector for PowerApps & Microsoft Flow
  • How to insert Condition Fields in DocumentsCorePack Templates designer
  • How licenses are counted
Categories
  • *News and General Infos* 65
  • Webinars 46
  • Template Designer(DCP 197
  • DocumentsCorePack(DCP 262
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 76
  • PowerSearch (PS 50
  • ActivityTools (AT 61
  • SmartBar (SB 54
  • GroupCalendar (GC 47
Our Vision

“We see it as our purpose to provide products that simplify and speed up our customers’ Microsoft Dynamics 365 experience.”

Knowledgebase
LogIn
mscrm-addons.com
  • Products
  • Online Shop
  • Downloads
  • My Account
About Us
  • About Us
  • Case Studies
  • Newsletter
  • Partner Program
  • Contact
Support
  • Support
  • Terms & Conditions
  • Documentation
  • Webinars
  • Legal Documents
  • Impressum
  • © 2025 www.mscrm-addons.com. All Rights Reserved.