Filter

The Filter processor is a tool which allows you to manipulate and group the database records to filter out those records which meet specific criteria.

Filtering can be done by either using built-in functions or JavaScript function for more complex filtering. Multiple levels of filtering are supported, and up to three filter conditions can be set for each field within a single processor.

Add Filter

To add a Filter processor, select the button on the menu bar and click on the location in the designer diagram. Use the Flow connector to connect the Filter processor and another processors together.

The Filter processor is present but the filters are not defined yet.

Edit Filter

After the Filter processor is added, you may need to edit the properties of the Filter processor.

There are two ways to access the properties of the Filter processor.

  • Double-click on the Filter processor
  • Right-click on the Filter processor and select the “Properties” option from the pop-up menu

Either one method will launch the Filter Wizard.

You can add up to three filters for the each field in the “Filter #1” to “Filter #3” tabs. They are identical. The “JavaScript” tab allows you to add script for more complex filtering.

Filter

The Filter tab has the following columns.

Function Description
Column Shows the row numbers.
Name Name of fields.
Type Data type of fields.
When Lists all available operator on the field.
Condition Lists all available options of the field.

Select or highlight the desired field and click on the cell under the “When” column. Select the desired operator for the field. Click on the cell under the “Condition” column. Select the desired option to perform the filter on.

JavaScript

The “JavaScript” tab allows you to add JavaScript code for more complex functionality.

Once the desired script is added, click on the “Finish” button to save the changes. To abort, click on the “Cancel” button.

Combining Filters

All criteria entered on a Filter tab must be true for the record to be passed through.

For example, the database records have companies A, B and C, selling apples. If Filter #1 is set to read Company Equals A and Fruit Equals Apple. Only those records where Company==A AND Fruit==Apple will pass through.

However, any records mot matched by Filter #1 may still be matched by Filter #2 and #3. Within a tab the rule is AND’ed. Access tabs, the rule is OR’ed.

So if Filter #2 has a filter Company Equals B, those records where

(Company==A AND Fruit==Apple) OR Company==B

will pass through. Therefore you will get all records where Company is B, regardless of the value of Fruit.

Filter Criteria

Comparable Types

This condition uses a simple comparison of values, which must both be of comparable types.
E.g., strings can be compared with strings, but not with dates.

When Condition
Equal
Not Equal
More Than
Not More Than
Comparable types:
String, Numeric, Date, Time, Timestamp

String

THis condition allows a regular expression to be used. Use operators such as “|” for OR and “&&” for AND relationship. For example, US|Mex will match USA or Mexico strings.

When Condition
Matches
Not Matches
String

“~”as Separator

This condition uses “~” as a separator for types such as numeric, date, time and timestamp.

When Condition
In Range
Not In Range
Numeric, Date, Time, Timestamp with “~” as separator.

Match Another DataSource

This retrieves the matching field from another datasource for filtering values.

When Condition
In DataSet
Not In DataSet
Matching field type from another datasource

Content Check

Checks if there is no content. Note that zero value is not considered null.

When Condition
Null
Not Null
None

JavaScript

This is useful for entering multiple conditions or complex conditions using standard JavaScript. For example,

Field1==5|Field2=="US|Mex"

where Field1 is numeric and Field2 is string.

When Condition
JavaScript
Not JavaScript
Enter a script condition by specifying the matching type.

Delete Derivative

To remove the Filter processor, simply select the Filter processor and click on the “delete” key on your keyboard. Alternatively, right-click on the Filter processor to display the pop-up menu and select “Delete Graphic” option.

Pop-up Menu

To access the pop-up menu of the Filter processor, right-click on the processor.

There are three functions in the pop-up menu.

Function Description
Properties Launches the Filter Wizard that allows you to edit the properties of the Filter processor.
View Output Switches to the “Data” tab, which displays the records of the datasource after the operation.
Delete Graphic Deletes the Filter processor.