The purpose of Filter node is to insert in some part of the form a control which will allow user to filter at runtime the grid´s records which accomplishes certain condition (based on some attributes). There is an ilustration of this below.
Filter node has the following properties:
Specifies the name of the variable which will represent the filter control on the form.
Filter variable's description. Represents the caption of the textblock which will apear next to the variable itself in the form if Show description property is True. In the example above variable is PersonLastName while its description is Last Name. So, "Last Name" will appear next to PersonLastName filter, like we can appreciate below.
Represents a label that will be inserted next to the variable if this property is not empty, in the same cell as it. The theme that will be asigned to this label will be taken from WWP Configuration -> Theme -> Att/Var Right text. An example of this property can be seen on same property of Attribute Node.
Specifies a message that will be displayed in the filter's field in order to describe what you should fulfill on it.
Represents a label that will be inserted between both fields in the Range filters (only applies for Range filters).
Specifies whether the filter will have a basic type (value Basic) or whether it will be based on some attribute, domain, SDT or BC (value based on).
Represents the domain or attribute in which the filter variable will be based on. This property can be empty. In this case, if the variable's name is equal to any attribute´s name then the variable will be based on that attribute. Otherwise, the variable will be defined as Numeric(4.0) which is the default definition for any variable. In the example above Domain/attribute property is '(none)' and as the variable's name is PersonFirstName (which exists an attribute with its same name), the varable will be defined based on that attribute.
Specifies the type of the filter. Most of the GeneXus possible types are supported by this property:
Specifies the default value that will be displayed in the filter when the page loads its first time. In other words, it specifies the filter's value by default. In the example above, Default property is empty so when PersonWW object loads, PersonLastName filter will be empty.
Only applies to variables in which their control type is combo box, and specifies whether an option to select all values will be added to the combo box or not.
Filter's theme class.
Specifies a condition that will determine whether the filter will be visible or hidden.
Specifies the sentence that will be executed within the filter variable value and the attribute value of every transaction record in order to determine whether the record accomplishes the condition or not, and therefore if the record will be included in grid or not.In other words, represents the condition sentence associated to the filter.
In the example above, condition is "PersonFirstName like &PersonFirstName when not &PersonFirstName.IsEmpty()". This means that if user leaves the filter field empty then all records will be shown but if user set some string in it, grid will display only the records which starts with the filter field value (because of the like command).
If you has the property 'Generate Data Selector' on True we can visualize the condition added in the Data Selector:
If you has the property 'Generate Data Selector' on False we can visualize the filter condition added in Tab Conditions:
At runtime, we can visualize that when PersonWW page loads all records are displayed because filter field is empty:
Then, if we set 'f' to filter field, according to the condition filter, grid will only display records in which its attribute PersonName starts with 'm'. We visualize the results:
There is a possibility to insert filters without setting a condition. This is useful in the following scenarios:
- Associate two filters (variables) into one condition concatenated by an ?OR? expression:
- Add a filter which will only show a related attribute of an FK (like in the following example: CompanyId, CompanyName).
Specifies whether the filter will have a specific control type based on some domain/attribute, etc or will be defined customized. If you leave this property in its default value (based on) with empty value in 'Control info based on' property the control type of the variable will be the same as its definition.
Depending on the value of 'Control Info' property some properties are visible or hidden automatically.
Specifies the domain or attribute in which the filter's control info will be based on.
Specifies the conditions to be added to the control (only if the control is Dynamic Combo, Listbox or Suggest).
Specifies the attribute's control type.
Most of the options that GeneXus allows for control types are supported in this property:
Specifies the name of the permission that the filter will have for defining whether that filter will be visible for some role. If the value is empty, it won't add security to the filter in this object.
If you want to read information about the Location in father table properties, follow this link: Location in father table
|