...
Field | Description |
---|---|
Filter | Allows the user to set up a filter on the pipe. |
Sort/Group | See the Order By Attribute form. |
Forms: Filter Condition Editor
Filters are available on a number of items in PhixFlow: Stream Views, charts, and pipes.
Filters are made up of a set of clauses; each clause in turn contains a number of conditions. These conditions must be satisfied for data to be passed through a Pipe or returned in a filtered list.
In some cases, filters are explicitly named, e.g. when filters are created against streams.
In this case, these top-level details are entered through the filter.
Form: Filter Details
Field | Description |
---|---|
Name | Name of the filter. |
Private | Check box that denotes whether or not the filter is only available to the user that created it. |
Description | Description of the filter. |
Form Icons
The form provides the standard form icons as well as the following:
Adds a clause to the filter. | |
Deletes the selected clause or condition from the filter. | |
Specifies that the value entered is a literal value. Click this icon to change this - to specify that the value entered be evaluated as an expression. | |
Specifies that the value entered is a evaluated as an PhixFlow expression. Click this icon to change this - to specify that the value entered be treated as a literal. Note : ["123", "234", "345"] looks like a literal value but it can be evaluated as an expression. |
Cache Extraction Filter
For Filters on Pipes a Cache Extraction Filter can be defined. This can be used when an Indexed Look-up is being used, see the main Pipe help page for details.
For a Pipe set up in this way, data is help in a memory cache. For each record processed in the Stream, records are retrieved from the cache using the index expressions. But the data required for each record can be further filtered using a Cache Extraction Filter.
Cache Extraction Filters are entered free hand, although they have a similar format to the text version of a filter that is shown as a filter is created in the main Conditions box of the Filter tab for Pipes (see above).
E.g. if you wanted to look up the Credit Rating for a customer, you might created an Index Look-up Pipe using CustNo as the key for the index. This means that for each record processed in the Stream, all the records would be retrieved from the cache for the CustNo in the record. But if this data was fully historied, you would get a number of records or each CustNo. So to extract the current record, you could include a Cache Extraction Filter in the form:
StartDate >= now() && (EndDate <= now() || EndDate == _NULL)
The attribute names referenced must exist in the source Stream - that is, the Stream you are reading from - or, if you are reading directly from a Database Collector, in the destination stream - that is, the stream you are generating. This means that in practice, when using a Cache Extraction Filter when reading directly from a Database Collector, to use any fields in the Cache Extraction Filter the fields must exist both in the query results in the Database Collector, and in the Stream being generated.
Filter on Current User
Views of entities that show a User or Owner attribute can be filtered to show only those records for which the Owner / User matches the current logged in user. This particularly applies to Alarms and user Tasks. To set a filter where the Owner equals the current logged in user, add a condition to the filter like this:
Owner Equals _user.name fx
Enter a list of values for an "Is In" or "Is Not In" filter
If you want to select a set of records which have a field set to one of a range of possible values you can do this by selecting the "Is in" or "Is not in" comparator from the drop down list and then simply typing the list of values into the edit box to the right of the comparator as a comma separated list like this: the filter like this:
Country Is in England, France, Germany ABC
In this case you should NOT click the ABC icon to the right of the value to convert it to an 'fx' indicating the value is a formula but should leave it specified as a literal value. If you do click the ABC icon to specify that the value entered is a formula then the value should be entered like this:
Country Is in ["England","France","Germany"] fx
Aggregate Attribute
Aggregate Attributes define the aggregated properties that are available when data is read from an aggregating Pipe. Note that Aggregate Attributes are not available on Pipes from Database Collectors (any aggregation can be performed in the query SQL), nor are they available on Pipes from File Collectors.
...