Filter variable

VariableIcon Description

Nodes of this type are used inside Filters nodes. Using this node, filters can be added to a grid, which will determine the data shown in them. 

Runtime appearance

The runtime appearance of this control depends on the "theme" property, and the properties inside "appearance" category. The variable will appear inside the "filters" section in the grid.

VariableFIlterRT
Filter variable

Properties

Category Name Value
General Name (Id) Contains the variable name.
Based On Defines the Type for the variable. Variables must be defined based on an Attribute or a Domain.
Description Description text to be set to the filter.
Filter Type

Defines the filter's type. Possible options are:

  • Standard: Typically used to create filters with simple conditions that involve only one attribute and allow the end user to select one value.
  • StringSearch: Used to create filters to search for a character value in several attributes. See Using StringSearch filters.
  • Multiple: Used to create filters that allow the user to select several values. See Using Multiple filters. Note: Only available in Web Panels.
  • Date Range: Used to create From/To filters for a date attribute using one filter only. Can be used to create "Semantic Filters" (eg: "Last Week", "Last Month", etc)
Condition

Contains a condition that uses this variable's value, and should be used to determine which data will be included in the grid.

The default value depends on variable "Based On" and the "Filter Type" properties. The default value can be modified by changing the property's value.

Filter Type = Standard

If it's based on a domain the default value is empty.

If it's based on an attribute:

  • If attribute data type is numeric att = &att when not &att.IsEmtpy()
  • If attribute data type is date att = &att when not &att.IsEmpty()
  • If attribute data type is a string will depend on K2BObjectDesigner->WebPanelDesigner->(Filters) String Search (Search)   Search when not &att.IsEmpty()

Filter Type = Multiple

The default value is calculated as "<Att> in &<Selected_Items_Collection> when &<Selected_Items_Collection>.Count > 0".

Filter Type = StringSearch

The default value is calculated as "<Att1> like '%'+&<Filter>+'%' or <Att2> like '%'+&<Filter>+'%' or .... <AttN> like '%'+&<Filter>+'%' when not &<Filter>.IsEmpty()"

Condition Attributes Contains a list of the attributes that should be searched. Only available in "StringSearch" filters. See Using StringSearch filters.

MultipleFilter

(Only available in Web Panels)

Multiple Filter Type

Indicates the multiple filter type for this filter. Possible values are: "Combo" and "TagsCollection".

Only visible if "Filter Type" = "Multiple". See Using Multiple filters.

Summary Max Visible Items

Contains the maximum amount of values shown as a summary in the combo's control (when the control is closed). 

Only visible if "Filter Type" = "Multiple" and "Multiple Filter Type" = "Combo". See Using Multiple filters.

No Items Selected Label

Contains the text shown in the combo's control (when the control is closed) if no items are selected. 

Only visible if "Filter Type" = "Multiple" and "Multiple Filter Type" = "Combo". See Using Multiple filters.

Allow Search In List

Indicates if the multiple combo control should include an option to search in the combo's elements. 

Only visible if "Filter Type" = "Multiple" and "Multiple Filter Type" = "Combo". See Using Multiple filters.

Search In List Condition

Contains the condition used to search in the list contents. 

Only visible if "Filter Type" = "Multiple", "Multiple Filter Type" = "Combo" and "Allow Search In List" = "True". See Using Multiple filters.

Search In List InviteMessage

Contains the Invite Message associated to the search control for the list. 

Only visible if "Filter Type" = "Multiple", "Multiple Filter Type" = "Combo" and "Allow Search In List" = "True". See Using Multiple filters.

Generate Clear Selection Action

Indicates if a "Clear Selection" action should be included in the UI.

Only visible if "Filter Type" = "Multiple" and "Multiple Filter Type" = "Combo". See Using Multiple filters.

Default Value (Comma-separated expressions)

Contains the values that will be selected in the filter by default. This property's value should be a list separated by commas, where each item is an expression. For example, valid values are:

  • 1,2,3,4 (for a filter based on a numeric type)
  • "a","b","c" (for a filter based on a character type)
  • K2BTrnMode.Display,K2BTrnMode.Update (for a filter based on an enumerated domain, in this case "K2BTrnMode")
Default Value Provider

Procedure used to initialize the selected values for this filter. The procedure must return selected values in a collection of the same type as the filter's.

This property is useful when the filter's values are not known during design time, but a default selection based on a defined criteria is desired. For example, in a "Country" filter, the default provider could specify that only the countries associated with the current user are selected by default.

If this property is set and the "Default Value" property is also set, both sets of values are used.

Date Range Filter Date Range Type

Possible values for this property are "Semantic" and "Manual".

If set to "Manual", From/To fields will be shown to the user.

If set to "Semantic", a combobox with the ranges defined in the "Semantic Date Range Set" property will be shown to the user. If the "Include Manual Option" property is set to "True", From/To fields will be generated as well.

Semantic Date Range Set

Contains a set of "Semantic Date Ranges" that should be included in the filter's combobox. This property is available only if "Date Range Type" is set to "Semantic".

A semantic date range is defined by:

  • An internal identifier (not visible to the end user).
  • An GeneXus expression to get the range's Description (will be shown in the semantic options combobox). This expression must return a Character Value.
  • GeneXus expressions to define the From/To boundaries of the range. These expressions must return DateTime values.
Include Manual Option

If set to "True", an option will be included in the filter's combobox that the user can choose to select a custom range. If this option is selected, From/To fields will be displayed for that purpose.

This property is available only if "Date Range Type" is set to "Semantic".

Date Range Empty Item

Determines if the filter's combobox will include an "Empty Item".

This property is available only if "Date Range Type" is set to "Semantic".

Date Range Empty Item Text

Determines the "Empty Item" text for the filter's combobox.

This property is available only if "Date Range Type" is set to "Semantic".

Date Range Default Date From

Determines the default "From" value for this filter. Must contain an GeneXus expression returning a DateTime value.

This property is available only if "Date Range Type" is set to "Manual".

Date Range Default Date To

Determines the default "To" value for this filter. Must contain an GeneXus expression returning a DateTime value.

This property is available only if "Date Range Type" is set to "Manual".

Form Visible When set to false, the filter will be hidden inside the web form. Note: Only available in Web Panels.
No Skip When set to true, the filter will be shown in the same line as the last one. See Using the "NoSkip" property
Readonly When set to "False" user can change the variable's value, set to false variable will not be editable. Note: Only available in Web Panels.
Invite Message Contains the string that will be used as an invite message. Only available when using Responsive Web DesignNote: Only available in Web Panels.
Tooltip Tooltip to be used when generating the filter control. Note: Only available in Web Panels.
Left Text Text placed before the filter, after the description. Note: Only available in Web Panels.
Right Text Text placed after the filter. Note: Only available in Web Panels.
Contextual Help Value

A text that will appear alongside the variable to provide help for the user. Character values must be placed between quotes. This property's value must contain an expression. This allows the developer to concatenate values ("Please insert value for " + &ProductDescription)

Example:

VariableContextHelpRT

Note: Only available in Web Panels.

Values Default Default value for the filter. This property is not valid for Multiple or Date Range filters.

Behaviour

(Only available in Web Panels)

Save State

Determines if the filter's value should be saved through the user's session.

Date Picker Determines if a date picker should be associated to this variable's control.
Date Time Filter Granularity Only valid in filters whose type is "Date Time". If set to "Date", the filter will be shown as a Date Variable and the "Time" will be ignored when evaluating the condition.
Appearance Class Filter's theme class. Note: Only available in Web Panels.
Description Class Description's theme class. Note: Only available in Web Panels.
Left Text Class Avaiable only if left text is not empty. Left Text's theme class. Note: Only available in Web Panels.
Right Text Class Available only if right text is not empty. Right Text's theme class. Note: Only available in Web Panels.
Autoresize Indicates if the filter's control should be resized automatically or not. Note: Only available in Web Panels.
Width If autoresize is set to false It allows to set the filter width. Note: Only available in Web Panels.
Height If autoresize is set to false It allows to set the filter height. Note: Only available in Web Panels.

Child nodes

ControlInfoIcon ControlInfo