# Apply Filters Template Conditions

### Overview

Run the **Apply Filters Template Conditions** action from a handler.

This action loads a saved **Filter Template** and applies it as **hidden conditions**. The Filter Panel is not updated. Users cannot see these conditions.

### Handlers and actions

* **Handler**: defines what happens when a user clicks a Kanban UI element.
* **Action**: an executable operation triggered by the handler.
* **Primary action here**: `Kanban API → Apply Filters Template Conditions`.
* **Optional follow-ups**: configure extra actions on success or failure.

See [Configuring Handlers](https://docs.flexikanban.ai/standard-kanban/tools/configuring-handlers).

### Key concepts

**Filter Template**\
A saved set of filter conditions.\
Templates can contain placeholders populated at runtime.

**Hidden conditions**\
Filter conditions not visible in the Filter Panel.\
They still affect which records are shown.

### Configuration

Configure the handler on the interactive element.

**Primary action type**\
`Kanban API`

**Primary action**\
`Apply Filters Template Conditions`

**Action parameters**\
JSON object used to select the template and provide substitution values.

{% hint style="warning" %}
Hidden conditions can confuse users. Add a button for [Clear Hidden Conditions](https://docs.flexikanban.ai/references/handlers/kanban-api-handler-types/filters/clear-hidden-conditions).
{% endhint %}

### Parameters

<table data-header-hidden><thead><tr><th width="111.34375"></th><th width="509.40625"></th><th></th></tr></thead><tbody><tr><td>Name</td><td>Description</td><td>Required</td></tr><tr><td><code>template</code></td><td>The name of the <strong>Filter Template</strong> to load.</td><td>Yes</td></tr><tr><td><code>values</code></td><td>JSON object containing values used to populate filter items defined in the template.</td><td>No</td></tr></tbody></table>

#### `values` notes

* Keys must match the template’s field names.
* Values can be static values or runtime expressions.

### Example

```json
{
  "template": "My Template A",
  "values": {
    "Opportunity.AccountId": "{Opportunity.AccountId}",
    "Opportunity.StageName": "Prospecting",
    "Opportunity.CloseDate": "{$System.Today}"
  }
}
```

***

### Behavior

When the handler runs the action:

1. Retrieves the filters list from the specified **Filter Template**.
2. Applies provided values to the template filter items.
3. Merges the result into the board's **hidden conditions**:
   * If a filter item was previously set (via a Kanban API handler call or Filter Panel interaction), its value is updated.
   * If a filter item was not previously set, it is added as a new hidden condition.
4. Applies conditions automatically.

### Related actions

* [Clear Hidden Conditions](https://docs.flexikanban.ai/references/handlers/kanban-api-handler-types/filters/clear-hidden-conditions) (remove all hidden conditions)
* [Clear Filter Conditions](https://docs.flexikanban.ai/references/handlers/kanban-api-handler-types/filters/clear-filter-conditions) (clears the Filter Panel only)
* [Reset Filter Conditions](https://docs.flexikanban.ai/references/handlers/kanban-api-handler-types/filters/reset-filter-conditions) (restore view defaults in the Filter Panel)

### Troubleshooting

**No conditions are applied.**\
The `template` value may reference a missing template.\
Names are case-sensitive.

**Template values are not substituted.**\
Keys in `values` must match the template’s field names.\
Use API names like `Opportunity.StageName`.

**Old hidden conditions are still active.**\
This action merges hidden conditions.\
It does not remove unrelated ones.

**Dynamic expressions in `values` are not resolving.**\
Expressions like `{Opportunity.AccountId}` resolve only when that context exists.\
Place the element where the referenced fields are available.

**Users cannot explain filtering.**\
Hidden conditions are not shown in the Filter Panel.\
Add a clear reset button for hidden conditions.
