Fire up your applications with Jazz
RSS
Jazz CMS Wiki

About Us

CMS CMS Administration GUI Jazz Jazz Administration Jazz Web Parts Library misc Roles Solutions Training Web Parts Web Service Website Design Website Procedures Wiki conventions WordML Workflow Administration

Quick Search
»
Advanced Search »

Page History: Jazz Filtering

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2014/09/24 14:10


Table of Contents [Hide/Show]


   Jazz Filtering
      Name-Value Filter Syntax
         Filter Syntax Notes
      Configuration File
      Edit Properties


Jazz Filtering

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 due today'.
Most filters are simple, e.g. 'IsCompleted=true' for Projects displays only the completed projects.


Some filters are complex, such as the filter shown in Figure 1. The filter show in this figure is a three-part filter.
  • 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.
  • TimeSpan.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 TimeSpan, 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.
    • TimeSpan.Hours>2 means the value of the TimeSpan 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.
Figure 1: Editor for Jazz Filtering

Figure 1: Editor Parameters for Jazz Filtering


Name-Value Filter Syntax

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

  • n1=v1: means that the value of the property n1 must be equal to v1.
  • n1!v1: means that the value of the property n1 must not be equal to v1.
  • n1!=v1: means that the value of the property n1 must not be equal to v1. This is an alternate notation to the previous Not Equals filter.
  • n1<v1: means that the value of the property n1 must be less than v1.
  • n1<=v1: means that the value of the property n1 must be less than or equal to v1.
  • n1>v1: means that the value of the property n1 must be greater than v1.
  • n1>=v1: means that the value of the property n1 must be greater than or equal to v1.
  • n1=v1;n2=v2: the ; indicates that this is an AND filter, means that all conditions must be true.
  • n1=v1&n2=v2: the & indicates that this is an AND filter, means that all conditions must be true. This is an alternate notation for the previous AND filter.
  • n1=v1|n2=v2: the | indicates that this is an OR filter, means that at least one condition must be true.
  • n1=v1!&n2=v2: the !& indicates that this is an NAND filter, means that none of the conditions must be true.

Filter Syntax Notes

  • The trailing ; in the filter is optional.
  • ; and & mean the same thing - AND.
  • Less Than, Less Than or Equals, Greater Than, and Great Than or Equals filters only apply to specific Property types: DateTime, TimeSpan, integers (32 bit numbers), long (64 bit numbers), doubles (fractions).
  • The Config file contains a list of Properties.
  • The Admin panel contains tools for understanding properties.

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 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.
  • 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.
Figure 2: Editor for Jazz Filtering

Figure 2: Editor Parameters for Jazz Filtering

http://www.wiebeworks.com - Wiki version 3.0.4.560.