The filters panel is an editor that allows you to modify the values of arguments for custom user views.
Arguments are displayed in the filters panel in the same order as they are specified in the view code.
If a user view has arguments, the filters panel can always be opened through the context menu of the view (three dots in the top right). Additionally, quick access to the argument editor for the user can be set using additional attributes.
To simplify access to the panel, you can enable the "Filters" button displayed on the left above the data. Users will be able to quickly open and close filters, facilitating navigation.
To do this, add the show_argument_button
attribute with a value of true
in the view code:
{ $arg int }:
SELECT
@show_argument_button = true,
...
The old user view attribute
show_argument_editor
also adds the "Filters" button to the view header but is kept for backward compatibility. It is recommended to use the attributeshow_argument_button
.
caption
: Displayed name of the argument. By default, it takes the attribute name.options_view
: For arguments with type reference
or array(reference(...))
, it allows limiting the list of values in the dropdown menu. More details here.control_height
: Height in pixels for the selection window in the collapsed state.{
$date_from date @{
caption: 'Period from'
},
$date_to date @{
caption: 'Period to'
},
$is_active bool default false @{
caption: 'Active'
},
$responsible reference(base.people) null @{
caption: 'Responsible',
options_view = &pm.ref_active_employees_view,
referenced_entity = {
schema: 'base',
name: 'people'
},
},
$statuses array(reference(pm.statuses)) null @{
caption: 'Status',
options_view = &pm.ref_active_actions_statuses_view,
referenced_entity = {
schema: 'pm',
name: 'statuses'
},
control_height = 50
}
}:
date_from
and date_to
, must be passed to the user view - they cannot be empty.is_active
argument can be omitted when passing it to the view, in which case its default value will be false
.responsible
can be left unselected. The options_view
sets the set of values available for selection.statuses
is an array of status identifiers. Multiple status values can be selected in the argument. options_view
and referenced_entity
specify possible values, and control_height
limits the maximum height of the argument input.