Download

Filters

Filters are used within page components (such as lists, analytics, and calendars) to allow users to restrict the displayed dataset.

Each filter defines the control type, the object field used for filtering, and additional settings depending on the filter type.

Property Type Description
title * string Filter name displayed in the interface.
type * string Filter type.
settings object Filter settings. Depend on the filter type.
required_permissions array Permissions required to display the filter.

Common settings

The following settings are available for all filter types.

Property Type Description
is_search boolean Use search instead of loading the full list of values. Recommended for filters with large datasets.
recipient_property string Object field used for filtering.

Filter Types

date

Date filter.

integer

Numeric filter.

Used to filter by identifiers, quantities, prices, and other numeric fields.

list

Dropdown list filter.

Supports two ways of populating the list:

  • dynamic;
  • static.

Dynamic List

Values are automatically loaded from the specified system object.

Settings:

Property Type Description
donor_object * string Object from which the list items are loaded.
donor_property_title * string Object field displayed to the user.
donor_property_value * string Object field used as the submitted value.

Example:


{
    "title": "Responsible",
    "type": "list",
    "required_permissions": [],
    "required_modules": [],
    "settings": {
        "is_search": false,
        "recipient_property": "responsible_id",
        "donor_object": "users",
        "donor_property_title": "last_name",
        "donor_property_value": "id"
    }
}

Static List

All available values are defined directly in the schema.

Property Type Description
list * array List of available options.

Each item in the list array has the following structure:

Property Type Description
title * string Text displayed to the user.
value * string Value sent to the API when the option is selected.

Example:


{
    "title": "Vehicle type",
    "type": "list",
    "required_permissions": [],
    "required_modules": [],
    "settings": {
        "recipient_property": "type",
        "list": [
            {
                "title": "Pickup",
                "value": "pickup"
            },
            {
                "title": "Semi-trailer",
                "value": "semi_trailer"
            }
        ]
    }
}

How It Works

When a filter value changes, the Frontend automatically adds the selected value to the data field of the API request using the name specified in recipient_property.

For example, given the following filter:


{
    "recipient_property": "responsible_id"
}

If the user selects the record with ID 15, the following request will be generated:


{
    "object": "orders",
    "action": "get",
    "data": {
        "responsible_id": 15
    }
}