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 add a filter to a relationship with DocumentsCorePack Template Designer

How to add a filter to a relationship with DocumentsCorePack Template Designer

4441 views 0 Updated on January 9, 2024

This step-by-step guide outlines how to add a filter to a relationship with DocumentsCorePack Template Designer. In this tutorial, we will show you how to add a filter to a query that loads product line items, so that the result will only return products with an amount greater than 500 Euro.

Step-by-Step Guide

Step 1: ​Create a new template

If you have not created a template with DocumentsCorePack before, please have a look at this article.

Step 2: Create a relationship

If you have not added a relationship to a template before, please have a look at this article.

Step 3: Add a filter to a relationship

Once the relationship is created, open the DocumentsCorePack template designer by selecting InsertMailMerge fields from the mscrm-addons.com tab in Word. Then select the Additional tab, an existing table, and the edit icon. From here, ❶ navigate to Filter and click on the Add button ❷.

Please Note: Any existing QID-Filter (Root-Record-Filter) is a reference to the base record.

Next, select which type of filter you would like to add (AND / OR). For this example, we use AND ❸. Then, click on the lower Add button ❹. The Condition window opens.

In the Condition window ❺, select a matching attribute (example: Amount), an operator (example: greater than) and a value (example: 500) and click on the OK button.​

Figure 1: Add a filter to a relationship

That completes the steps for adding a filter. Click on the OK button in the Configure Fields and Datasource window to return to the Template Designer in order to proceed.

Sample resulting table with the filter (amount > 500).

Figure 2: Sample result with filter

As an additional filter option, you can use the column comparison (external link) option, which is an extension of Microsoft to fetch queries ❶.

You can also use dynamic filters, which are an additional DocumentsCorePack feature ❷.

Figure 2: Additional options for filtering (left: column comparison, right: dynamic filters)

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

Was this helpful?

Yes  1 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
  • Recap: Nordic Summit 2025
  • The new Template Designer Office Add-In
  • Debugging the Template Design Office Add-In 
  • Updating Legacy SharePoint Connections 
  • What Happens After You Deploy AttachmentExtractor: Storage & Cost Savings in Dynamics 365
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 260
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 75
  • 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.