# filtersAddOnBlock

{% hint style="info" %}
Note: This block is used for dropdown. You can add multiple blocks to 1 grid to combine different data.
{% endhint %}

### Properties

| Block Property | Definition                                                                                                                                       | Example Input                                                         |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| type           | A block for providing dynamic filters to DocumentsSourceAddOn Block                                                                              | **filtersAddOn**Block (Can't be changed).                             |
| tag            | Unique name for the logic block.                                                                                                                 | report\_\_by\_\_project                                               |
| permissions    | Which entity has rights to interact at this part of the workflow.                                                                                | Installer.                                                            |
| defaultActive  | Shows whether this block is active at this time and whether it needs to be shown.                                                                | Checked or unchecked.                                                 |
| dependencies   | Automatic update. The block is automatically re-rendered if any of the linked components gets updated.                                           | Select the appropriate block from the dropdown.                       |
| type           | Filter type, so far only Dropdown type - allows the user to select one of the available values.                                                  | The list of available values is provided by DocumentsSourceAddonBlock |
| canBeEmpty     | if true - if the filter is empty, then it is not taken into account when filtering. If false - then after filtering there will be an empty array | checked or unchecked                                                  |
| field          | the field by which the filtering will take place                                                                                                 | document.credentialSubject.0.ref                                      |
| optionName     | the field to be used as the label                                                                                                                | document.credentialSubject.0.id                                       |
| optionValue    | the field that will act as the value                                                                                                             | document.credentialSubject.0.id                                       |

### UI Properties

| Filter Property | Definition             | Example Input |
| --------------- | ---------------------- | ------------- |
| Title           | Filter title           | Filter1       |
| Button Context  | text inside the button | Project       |

### API Parameters

<mark style="color:blue;">`GET`</mark> `blockType:`&#x20;

#### Path Parameters

| Name                                          | Type    | Description                                          |
| --------------------------------------------- | ------- | ---------------------------------------------------- |
| id<mark style="color:red;">\*</mark>          | String  | Block ID                                             |
| blockType<mark style="color:red;">\*</mark>   | String  | Block Type                                           |
| type<mark style="color:red;">\*</mark>        | String  | Block filter (dropdown)                              |
| uiMetaData<mark style="color:red;">\*</mark>  | String  | {}                                                   |
| canBeEmpty<mark style="color:red;">\*</mark>  | Boolean | True, if the filter can be empty, false if otherwise |
| data<mark style="color:red;">\*</mark>        | Object  | Data for the filter (array)                          |
| optionName<mark style="color:red;">\*</mark>  | String  | Data used as a label                                 |
| optionvalue<mark style="color:red;">\*</mark> | String  | Data used as a value                                 |
| filterValue<mark style="color:red;">\*</mark> | String  | Current filter value                                 |

<mark style="color:green;">`POST`</mark> `blockType:`&#x20;

#### Path Parameters

| Name                                          | Type   | Description      |
| --------------------------------------------- | ------ | ---------------- |
| filterValue<mark style="color:red;">\*</mark> | String | New filter value |
