# Advanced Filtering

### Concept of advanced filtering <a href="#concept-of-advanced-filtering" id="concept-of-advanced-filtering"></a>

Some filters can't be automatically retrieved from your monday board (e.g. subitems). In such cases, we need to load all items and filter on our side by including the filter condition in the docx template.

**Note:** That's a relatively rare needed feature for advanced use cases. Please check out these help center articles before:

* [​Apply board filters​](https://help.pdfreportgenerator.com/create-report/apply-board-filter)
* ​[Dynamic Tables​](https://help.pdfreportgenerator.com/tables)

#### **Step 1: Retrieve the filter string** <a href="#step-1-retrieve-the-filter-string" id="step-1-retrieve-the-filter-string"></a>

1. Open the PDF Report Generator view in your monday board
2. Apply your preferred filters in the board
3. Click on '**More**' and select '**Subscription**'
4. Click on the button 'Copy filter condition' to retrieve the specific, coded filter string:

<div><figure><img src="https://1390058080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF9ADBOi8Mmb40b5fAD2l%2Fuploads%2FSUUdPFZT3mKPxSLLTAcB%2FPDFReportGenerator_Filter.png?alt=media&#x26;token=0c0e33e1-fed3-45a5-a7a5-8bf60d0cb5a7" alt=""><figcaption></figcaption></figure> <figure><img src="https://1390058080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF9ADBOi8Mmb40b5fAD2l%2Fuploads%2F9Wiw9h0zitnIxrgSCIzi%2FPDfReportGenerator_AdvancedFiltering.png?alt=media&#x26;token=bf338d04-7884-4663-adba-a508b8046978" alt=""><figcaption></figcaption></figure></div>

In our example, the copied code string looks like this:

{% code overflow="wrap" %}

```
W3tjb2x1bW5faWQ6Im5hbWUiLGNvbXBhcmVfdmFsdWU6WyJNaWxlc3RvbmUiXSxjb21wYXJlX2F0dHJpYnV0ZToiIixvcGVyYXRvcjpjb250YWluc190ZXh0fSx7Y29sdW1uX2lkOiJzdGF0dXMiLGNvbXBhcmVfdmFsdWU6WzBdLGNvbXBhcmVfYXR0cmlidXRlOiIiLG9wZXJhdG9yOmFueV9vZn1d
```

{% endcode %}

**Background information for advanced users:**\
This code is a Base64 encoded filter string from monday. If you decode this string, the result would be

{% code overflow="wrap" %}

```
[{column_id:"name",compare_value:["Milestone"],compare_attribute:"",operator:contains_text},{column_id:"status",compare_value:[0],compare_attribute:"",operator:any_of}]
```

{% endcode %}

### Step 2: Include filter in a template

You can now use this filter in your templates.

**Advanced Filter for Item Level**

If you want to use the filter for item level, the filter needs to be included in the **`{{TableStart:Groups}}`** and **`{{TableEnd:Groups}}`** placeholders within brackets:

`{{TableStart:Groups`**`(Filter string)`**`}}`

`{{TableEnd:Groups`**`(Filter string)`**`}}`

In your template, it would look something like this (highlighted in red):

<figure><img src="https://1390058080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF9ADBOi8Mmb40b5fAD2l%2Fuploads%2FjzSjmYhhqgk5sSc3LQQh%2FBildschirmfoto%202025-06-25%20um%2015.21.53.png?alt=media&#x26;token=3be64ceb-6450-4fd8-a875-f5e9107a4e40" alt=""><figcaption></figcaption></figure>

**Advanced Filter for SubItem Level**

You can also add the filter to a subitem table (see: [Subitem Table](https://app.gitbook.com/o/QlTDm0z88VmWkYWtzmvM/s/MnVzL8c1pE5zXO95iUKm/template/subitem-table)).

In this case, the filter needs to be included in the **`{{TableStart:SubItems}}`** and **`{{TableEnd:SubItems}}`** placeholders within brackets:

`{{TableStart:SubItems`**`(Filter string)`**`}}`

`{{TableEnd:SubItems`**`(Filter string)`**`}}`

In your template, it would look something like this (highlighted in yellow):

<figure><img src="https://www.gitbook.com/cdn-cgi/image/dpr=2,width=760,onerror=redirect,format=auto/https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FMnVzL8c1pE5zXO95iUKm%2Fblobs%2FUUUE7gr44f9rPkd4rNoS%2FFiltered-Subitems-Table.png" alt=""><figcaption></figcaption></figure>

**Combination of both SubItem and Item Level Filter**

In this case, both the item level and the SubItem filter needs to be included in the document.

In your template, it would look something like this (Item level filter highlighted in red, SubItem filter highlighted in yellow):

<figure><img src="https://1390058080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF9ADBOi8Mmb40b5fAD2l%2Fuploads%2FPNTbN037Dlwg5IBRDMMf%2FDesign%20ohne%20Titel%20(1).png?alt=media&#x26;token=f7854801-2fe3-4198-a0d1-77989ac4a5f7" alt=""><figcaption></figcaption></figure>

**Note:** this feature is an advanced feature and you just need it in specific use cases. If you have any questions, please reach out to our [support team](https://www.pdfreportgenerator.com/contact/).
