Multiple filters

Introduction

In many scenarios it is necessary to define filters that allow the user to select more than one value. For example, in a customer transaction the end user may wish to filter the contents and see only the customers associated to certain countries.

K2BTools includes options to create this type of filters in a simple way, using the "Type" property in Filter variable nodes. Currently three types of Multiple Filters are supported: Multiple Combos, Multiple Lists, and Tags collection.

MultipleFilterCombo MultipleFilterTags
Multiple Filter Type = "Combo" Multiple Filter Type = "TagsCollection"

MultipleFilterList
Multiple Filter Type = "List"

The developer can choose which type to use depending on the scenario being targeted. The best option for the scenario depends on the amount of candidate items that may be selected in the filter, and the expected size for the selected items collection.

Usage

To create a multiple filter, add a new Filter and set its "Filter Type" property to "Multiple". At this point, several properties will be shown. These properties can be used to customize the filter's generation. In particular, the "Multiple Filter Type" property can be used to select if the filter should be created as a "Multiple Combo", a "Multiple List", or as a "Tags Collection" filter.

The filter's logic can be customized by adding a ControlInfo node to it. If no ControlInfo node is added, that information is inferred from the attribute or domain selected in the "Based On" property.

When using MultipleCombo or MultipleList, the ControlInfo is assumed to be Combo or DynamicCombo, and the Values, Descriptions, Conditions, and Instantiated Attributes properties are read when generating the combo's contents.

When using TagsCollection, the ControlInfo information is used to define the variable present inside the filter (where the user can enter values).

Customization

Multiple Combo and Multiple List filter types

In this type of filters, the following properties can be altered:

  1. The inclusion of a search option to find items in the Combo.
  2. The inclusion of a "Clear selection" action.
  3. The label that should be shown when no items are selected (only in Multiple Combo).
  4. The maximum amount of items shown in the summary shown in the Combo's control (only in Multiple Combo).

These properties can be found in Filter variable (in the "MultipleFilter" category) and also in K2BWebPanelDesignerSettings or K2BTools General Settings depending on the context (in the "MultipleFilters\MultipleCombo" category). Values in the settings objects are used as default values in Filter variable nodes.

K2BWebPanelDesignerSettings and K2BTools General Settings also include properties to define the Theme classes associated to each component in the UI associated to these filters

Tags Collection filter type

For this type of filters, customization options are included in K2BWebPanelDesignerSettings and K2BTools General Settings. In these nodes properties can be found to change the following:

  1. Amount of columns used in the tags collection.
  2. Add and Remove Actions (captions, images, theme classes)
  3. Theme classes for all UI components.