This step-by-step-tutorial outlines how to add a filter to a relationship in DocumentsCorePack Template Designer. Usually, the simple creation of a relationship is enough, but sometimes, it can happen that you need to add a certain filter to a relationship.
For example, imagine you would like to create an overview that shows which products you have in stock.
So, you could create one template listing all products where the amount is greater than 0 and one template where the amount is exactly 0.
In order to refine your result, you could additionally create a template that lists all products with an amount greater than 500.
In this tutorial, we will show you how to create add a filter to a relationship, so that the result will only return products with an amount greater than 500.
Step 1: Create a new template
If you haven’t created a template yet, please have a look at this blog article.
Step 2: Create a relationship
If you haven’t added an relationship yet, please have a brief look at this post.
Step 3: Add a filter to a relationship
Once the relationship is created ❶, navigate to filters and click on the [Add]-button ❷.
Please Note: Any existing “QID-Filter” (Root-Record-Filter) is a reference to the base record and used to
Next, select which type of filter you would like to add (AND / OR) (here we use AND) ❸.
Then, click on the lower [Add]-button ❹. This behaviour opens a new window.
In the Condition-window ❺, select a matching attribute (here: Amount), an operator (here: greater than) and a value (here: 500) and click on the [OK]-button.
That’s all you have to do. Simply return to the Template Designer with a click on the [OK]-button in the Configure Fields and Datasource-window in order to proceed.
Additional Filter options that you have are the column comparison (external link) which is an extension of Microsoft to fetch queries (❶).
Or you also can use dynamic filters that which is an additional DocumentsCorePack feature. (❷)
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to email@example.com.