Jazz Filtering

Modified on 2017/06/04 21:01 by Charles — Categorized as: Jazz, Jazz Administration

Table of Contents [Hide/Show]


Jazz Filtering Overview

Jazz Filtering has two aspects: 1. Display a subset of records based on some criteria. 2. Allow the user to select a subset of records based on some criteria. 3. Allow the user to select a subset of records based on predefined filters.

Configured Filters

Jazz Filtering is used in a number of Web Parts to display a subset of records of a particular class. e.g. show the 'completed projects', 'not started tasks', 'tasks that are due today'.
Most filters are simple, e.g. 'IsCompleted=true' for Projects displays only the completed projects.


User Selectable Filters

Figure 1: Jazz Filters

Figure 1: Jazz Filters

Data relationships exist between different classes of data. e.g. Data helps us answer questions like: What needs to be done to finish task X? What tasks belong to Project A vs What tasks belong to Project B? What work is Joe doing?
The Site, Foreign Key Filter and Select By Filter allow the user to select subsets of data that are important to them.

Using Select By Filter

The Jazz Grid allows the user to define filters on the fly. This is useful when one is exploring the data. However, one finds that there are a set of filters that get used every time the user reviews the grid. Therefore, we created the option to define and save filters. Then apply them to the grid data. Filters are edited and saved in Figure 2: Filter Editor.

Figure 2: Jazz Filter Editor

Figure 2: Jazz Filter Editor


Some filters are complex, such as the filter shown in Figure 3. The filter show in this figure is a three-part filter.
  • Filter Duration.Hours>2;StartTime.Year=2014;IsCompleted=true;: is a name-value set of filters. This filter is useful when the objects being filtered have the properties Duration, StartTime and IsCompleted. You need to have some knowledge of the object to create filters. Adding dot expressions to the filter makes the filter useful and usually simpler.
    • Duration.Hours>2 means the value of the Duration property in terms of Hours is greater than 2.
    • StartTime.Year=2014 means the value of the StartTime property in terms of the Year is equal to 2014.
    • IsCompleted=true means that value of the IsCompleted property is true.
    • When these three conditions are true, then the record is displayed in the browser.
  • Foreign Key Filter = LocationId;Station;Location means that a drop down list for the LocationId property will be displayed with a label - Station and containing all Location records.
  • Select By Filter: is a filter that retrieves predefined filters that can be selected by the user to select subsets of data.
  • Filter by Site: filters the records by the site where they are located. This is useful when you are collecting records from multiple stores and want to compare records between stores. A drop down list is displayed on the page for the user to select the site (or all sites) that they want displayed.
Figure 3: Editor for Jazz Filtering

Figure 3: Editor Parameters for Jazz Filtering


More about Jazz Filtering

Jazz Filters are used for a variety of tasks in the Web Parts. They are used by website administrators to:
Jazz Filters may be configuration using the Web Part Editor as shown in Figure 1 or in xml files as shown in Figure 2. Let's explore the contents of the figure.

Filters XML structure

The Filters XML structure, shown in Figure 2, shows three levels: Filters, Filter and Expression.

Filters


Filter


Expression


Name-Value Filter Syntax

Name-Value filters have the following syntax: Property-Operation-Value.


Filter Syntax Notes


Configuration File

The configuration file is used to style the display of a Jazz object. More information is available at Workflow Configuration File for Web Design.

All Jazz classes have a default Configuration File embedded in the software. This property points to an external file that overrides the internal definitions.

Edit Properties

Edit properties for Jazz Filtering include:
  • Config File: an xml-based file that contain workflow configuration parameters used to customize the display of a Jazz object.
  • Filter: A 'name=value;' delimited list of properties and values used to filter the collection displayed. The model MUST satisfy ALL conditions to be displayed.
  • Foreign Key Filter: A 'propertyName;DisplayName;group;' property and group used to filter the collection displayed. e.g. ProjectId;Hobbits;Project, where ProjectId is a foreign key property, Hobbits is the name displayed on the form and Project is the class name of the group displayed in the drop down list.
  • Select By Filter: Filter used to create a dropdownlist filled with filters that allow the user to select models using filters that are saved in JFilters table. Create a Filter to get the filters from the JFilter Table. e.g. TargetClassType=CatanPlayer.
  • Filter by Site: Sites define a specific location. Network Applications that exist at multiple stores, e.g. stores, find it useful to filter objects for a specific store.
Figure 4: Editor for Jazz Filtering

Figure 4: Editor Parameters for Jazz Filtering