Query Filters
AwareIM offers a number of different filters that allow users to pinpoint exactly the record(s) they are interested in. For example, a query may retrieve all active customers, but the user can filter the results further by specifying the last name of the customer he wants to navigate to. Filters are available for standard, custom, calendar and chart queries. The type of filters available slightly varies depending on the type of the query they apply to. You can specify one or more filter types for the same query.
Grid Row and/or Column
This type of filter is specific to standard grids. Select this filter to show one or more text boxes above the query results table (see the picture – note the text boxes under the First Name and Last Name columns). If the user enters the value into the text box and presses Enter the query results will be filtered according to the entered value.
You can select from the following sub-options:
Setting | Effect |
---|---|
Show filter button in the corresponding column header | Rather than displaying a text box in a separate row as on the picture abov selecting this option will only display a filter button in the column header. The user can click on the button and choose various filtering options. |
Show filters as a separate row at the top of the grid | This shows text boxes in a separate row as shown on the picture above but does not include the filter button next to the text box. The user can only filter using the text boxes. |
Show filters both in the column header and in a separate row | This option is shown on the picture above. The filters are displayed in a separate row and the user can filter both by using text boxes and also the filter button next to the text box. |
Filter attributes | You can select which attributes will be filterable. For those that are not AwareIM will not display the filter button and/or filter text box. You can select the default operator for each attribute and for attributes with choices you can define whether the filter widget will include choices. |
Multi-checkbox Filter | If a filter is implemented by a Filter button, you can choose the Type of the filter - Standard or Multi-checkbox. The standard filter allows user to specify filter conditions in a manner similar to that of the User Defined filter, however unlike the User Defined filter it is limited to two conditions per filter. Alternatively, you can click on the filter type cell in the table and choose a Multi-checkbox filter. This filter works by displaying multiple checkboxes with values in a popup window. The values are determined from existing records returned by the query (only distinct values are displayed). When the user ticks one or more values the query will be filtered accordingly and only records with those values will be displayed. You can also define some properties of this filter if you select the filter row in the Configuration Tool and click on the Settings button in the top right corner of the table. A popup dialog will be displayed where you can select the following options: - how to sort the resulting records - whether or not to use filters set up for different columns when calculating distinct values displayed by the checkboxes - whether or not to recalculate these values every time the user opens the filter window |
User-defined Filter
This filter applies to standard, custom, calendar and chart queries. It allows end users to define filter expressions themselves. You need to define attributes that the user will work with when creating filter expressions and you also need to define where the filter will be displayed - if the filter is displayed in the custom panel header, AwareIM will automatically add special HTML into the custom header. Do not delete it. If a query already uses a classic panel header, then it is possible to display this filter above the panel header.
At runtime AwareIM displays a filter consisting of several buttons - current condition (AND/OR) and two buttons to create expression for the current “group” and to start a new group. The user presses on these buttons to create sophisticated filter expressions. Once the user presses the Apply button AwareIM runs the filter and displays the result - see picture below:
Single Search Control
An example of this filter is in the Dashboard of the CRM sample application.
This type of filter displays a single “Search” control. The beauty of this control is that the user can filter not by one attribute but on several attributes that you define (maybe even all attributes). When the user enters the text inside the control and presses Enter AwareIM searches by all defined attributes using the OR expression. So if you defined Name, Address, Email attributes for this filter, then when the user types in “jane”, AwareIM will add the following conditions to the filter:
Customer.Name CONTAINS 'jane' OR Customer.Address CONTAINS OR Customer.Email CONTAINS 'jane'
So when defining this filter, you need to define attributes to search by, default operator to use when searching, the label for the control (optional), width in pixels (optional), as well as where this control will be located. The options are:
Show control in the top or bottom toolbar
If you select these options AwareIM will automatically put the control to the right of the toolbar. However, you can change where in the toolbar the control will be located if you define a placeholder for the control. This placeholder should be an item of the Text type and it should contain an HTML <div> element with the class “filter_ph”, for example:
<div class="filter_ph"></div>
At runtime AwareIM will replace this placeholder with the actual filter control.
Show control in the custom header or above the classic header
When you select these options AwareIM will generate a special HTML code that it will put in the custom header.
Value List Filter
An example of this type of filter is in the Issue Resolution sample application (the Issues tab - see the picture below). This filter shows a one or more toggle buttons. When the user presses such a button AwareIM either adds or removes the condition to the filter. The condition is:
Object.Attribute CONTAINS 'Value Specified When Defining The Button'
When you define such a filter you need to specify attributes that will be represented by different buttons and for each button you need to specify the Label that will be displayed on the button and the corresponding value that the filter will filter by (this value is often the same as the Label). You also need to define where the filter will be displayed - if the filter is displayed in the custom panel header, AwareIM will automatically add special HTML into the custom header. Do not delete it. If a query already uses a classic panel header, then it is possible to display this filter above the panel header.
Custom Row Filter
This filter applies to Custom, Calendar or Chart parsers. It displays a list of controls (one control per specified attribute). When the user enters a value in such a control AwareIM filters the query by the attribute and the value:
Object.Attribute CONTAINS 'Entered Value'
When you define such a filter you need to specify attributes that will be represented by different controls and for each control you can specify the Label, width of the control and whether to display a combobox if the attribute has choices. You also need to define where the filter will be displayed - if the filter is displayed in the custom panel header, AwareIM will automatically add special HTML into the custom header. Do not delete it. If a query already uses a classic panel header, then it is possible to display this filter above the panel header.
Video
This video tutorial explains how to define various types of filters for AwareIM queries.