# Filtering the task list and the case list

In the Eximee Dashboard, data can be filtered in the task list and the case list.

## Basic filtering

The mechanism for filtering the task list and the case list enables searching for tasks by a process variable **SEARCH\_STRING**. Multiple fields combined into one string (e.g. separated by commas) can be passed to the variable, which allows searching for data by a fragment of a value. The filter works based on the operator `LIKE` known from SQL.

The value of the variable **SEARCH\_STRING** should contain all the data by which the user should be able to search.

Example script setting the value for the variable **SEARCH\_STRING**:

```js
def submittedLeads = execution.getVariable("submittedLeads")
def rejectedLeads = execution.getVariable("rejectedLeads")
def businessKey = execution.getVariable("start.formInstanceNumber")
def lead = execution.getVariable("Lead")
def cif = execution.getVariable("CIF_Klienta")
def time = execution.getVariable("Czas_lokalny")
def modSkp = execution.getVariable("SKP_Wypełniającego")
def skp = execution.getVariable("SKP_doradcy_portfelowego")
def branchSkp = execution.getVariable("Oddział_zgłaszającego")

def dashboardParams = [
	"Application number"                : businessKey,
    "Selected leads"                    : lead,
    "Client CIF"                        : cif,
    "Application submission time"       : time,
    "Completing SKP"                    : modSkp,
    "Portfolio advisor SKP"             : skp,
    "Branch SKP"                        : branchSkp,
	"Submitted leads"                   : submittedLeads,
	"Rejected leads"                    : rejectedLeads
]

searchString = businessKey + "," + 
               cif + "," + 
               time + "," + 
               modSkp + "," + 
               kp + "," + 
               branchSkp

execution.setVariable("PROCESS_DASHBOARD_DESCRIPTION", "Lead Processing Process")
execution.setVariable("PROCESS_DASHBOARD", dashboardParams)
execution.setVariable("SEARCH_STRING", searchString)
```

In the above example, searching will be possible, among others, by:

* application number,
* client CIF,
* submission time,
* SKP identifiers.

The basic search filter is located in the upper-left corner (the field with the "magnifying glass"). Example of filtering the case list by the branch SKP number:

<figure><img src="/files/65ff7fbb973b13bda2240c84b374ec5665da97c0" alt=""><figcaption><p>Figure 1. Filtering the case list</p></figcaption></figure>

For the filter to work correctly, the variable **SEARCH\_STRING** must be added in the process variables.

Filters are stored in the URL address, which makes it possible to send a link with set filters to other users and to change filters from the URL level.

## Advanced filtering

The advanced filtering functionality is marked with the symbol: ![Ikona filtra](/files/239b2c3395e47149bd1e8554a822ce14051b1fdd)

### Task list

Available filtering parameters:

* **Case status**
  * Filtering by the businessStatus variable.
  * Multi-select field.
  * The list of available values is controlled by the variable **FILTER\_TASK\_STATUSES**.
* **Person assigned to the task**

  Available options:

  * all tasks,
  * only my tasks,
  * only unassigned tasks,
  * tasks of selected users (search after a minimum of 3 characters, possibility to select multiple users).
* **Task creation date**
  * Possibility to specify a date range (from – to).
* **Case type**
  * Filtering by the variable **processDefinitionKey**.
  * Multi-select field.
  * The list of values is controlled by the variable **FILTER\_PROCESS\_TYPES**.
* **Case ID**
  * Filtering by the businessKey variable.
  * The search works on the basis of the operator `LIKE`.

<figure><img src="/files/2cef49a26caa95bdcaa3b07206559ea4500c3d94" alt=""><figcaption><p>Figure 2. Advanced task list filter</p></figcaption></figure>

### Case list

Available filtering parameters:

* **Case status**
  * Filtering by the variable **businessStatus**.
  * Multi-select field.
  * The list of values is controlled by the variable **FILTER\_PROCESS\_STATUSES**.
* **Case type**
  * Filtering by the variable **processDefinitionKey**.
  * Multi-select field.
  * The list of values is controlled by the variable **FILTER\_PROCESS\_TYPES**.
* **Case ID**
  * Filtering by the variable **businessKey**.
  * The search works on the basis of the operator `LIKE`.

<figure><img src="/files/4912a24990640d5c3c58efb2cb37ef81a3dfad1a" alt=""><figcaption><p>Figure 3. Advanced case list filter</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/eximee-dashboard/filtrowanie-listy-zadan-i-spraw.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
