Table of Contents | ||||||||
---|---|---|---|---|---|---|---|---|
|
Overview
A The Publish Filter is used by a Publisher object to curate the output from the collected records table as a whole. An example would be to only publish records to the output that follow some specific naming conventions.
Creating A Publish Filter
A Publish Filter can be created using any one of several methods. See Creating Objects.
Configuration
General Tab
This tab is common to all objects in ACM. See General Configuration.provides the ability to narrow the list of devices and meters that a given publisher will use.
Info |
---|
See the General Object Configuration guide for assistance configuring the General tab. |
Group Tab
Click the Edit Group button to configure the Publish Filter Record Collection of rules to apply to the filter.
...
Records
Info | ||
---|---|---|
| ||
Clicking the "Tabular Display" button will open the filters in a grid and will make adding and editing multiple rules simpler. All examples shown below use the Tabular Display. |
Records can be added or removed using the Add, Remove and Copy buttons on the lower left. Each record uses the following fields:
- Aggregate. Aggregate option to combine current filter with next filter that is added. When the aggregate is blank, it acts as an OR.. The available options are:
- "AND all previous filters": This aggregate groups the current row with all the rows above it, then "ANDs" that group with the following
- "AND next filter": This aggregate "ANDs" this filter row with the one immediately below it.
- "OR all previous filters": This aggregate groups the current row with all the rows above it, then "ORs" that group with the following
- "OR next filter": This aggregate is used to separate other filter rows that are joined by any of the above three (* This is the aggregate used when the "aggregate" value is left blank.)
- Name Text. Text used to query for object's name. Can include wild cards ? (to represent a single character) and * (to represent any number of characters).
- Not Name Text. Text used to exclude objects. Can include wild cards ? (to represent a single character) and * (to represent any number of characters).
- Parent Folder. The folder containing objects to publish. Child folders are included. Note: the use of "Unassigned" tells ACM to look in every folder.
- RecordId. Display Name of Record.
...
title | Saving Record Collection Changes |
---|
...
*After closing the Record Collection form, save the object to save any changes made to the record collection.
Aggregate Examples
Example 1
In this example, the goal is to publish devices from a specific parent folder called Fields while also excluding devices that start with the letter D or G. The aggregate option selected is And next filter. This concatenates the first requirement with the second.
This screen capture shows the Tabular Display editing option. The excluded devices are highlighted in the object tree.
Info | ||
---|---|---|
| ||
Leaving the Aggregate field blank or changing it to "OR next filter" will return unexpected results, with it returning all devices in all folders that do not begin with the letter D. This is because the two statements now operate independently from one another and the second statement will include the "G" devices that were excluded in the first statement. |
Example 2
In this example, the goal is to publish devices that start with R7 or B in the Fields Folder. The aggregate option selected is Or next filter.
This screen capture shows the Tabular Display editing option. The included devices are highlighted in the object tree.
More information about the use of each aggregate and the order of operations are found on the Publish Filter Aggregate Examples page.
Filter Examples
All examples will use the tree below and displayed in the "Tabular Display" view. These examples show the solution requiring the least number of aggregates.
Info |
---|
One of the common challenges in building filters is how we think about what we want published and our use of the "AND" and "OR" words. For instance: "I want every device in Device Set A and Device Set B" entered as a filter would actually be processed as "I want every device that exists in both Device Set A and Device Set B". Instead we need to think of it as "I want every device that exists in Device Set A OR exists in Device Set B." |
Example 1: Publish data for every device that begins with 'NGCTT' in Device Set D or is in Device Set A.
What works:
Using the "OR next filter" aggregate and an ‘*’ after ‘NGTT’ so ACM knows that objects to publish are:
- Found in the Device Set A folder OR
- Begin with ‘NGCTT’ and are found in Device Set D folder.
Example 2: Publish data for every device that exists in Device Set D and does not start with 'NGCTT' or exists in Device Set A.
What works:
- In this case, the filter is the same as Example 1 except the NGCTT* has moved into the "Not Name Text" field so that ACM rules it out.
Example 3: Publish data for all devices except for those in Device Set C.
In ACM, it is not possible to rule out an entire folder. Instead, we need to rule in all acceptable folders.
What works:
- Using the "OR next filter" aggregate to include each folder.
Example 4: Publish data for all devices that have both an "m" and a "y" OR are in Device Set A
What works:
- "AND next filter" on the first row to find devices containing both an "m" and a "y" and on the third row, we use the "OR all previous filters" to mean that all of the previous filters must be considered as one.
- "AND next filter" on the first row to find devices containing both an "m" and a "y", an "OR next filter" on the second row and no aggregate on the third row would have the same results
Example 5: Publish data for all devices that have both an "m" and a "y" but do NOT have a "p"
What works:
- Here we needed to "AND next filter" all three.
What doesn't work:
- Had we used "OR next filter before the record with the "p", it would have returned devices containing an "m" and a "y" and ALSO all devices that do not contain a "p" (whether or not they contain an "m" and a "y")