At least twice now I've seen this topic come up where a source filter is being used, and it does not return the expected result. In all cases, an expression of some kind is being used that produces a name that will look like *Flowmeter 1*
, but instead of filtering out all but Flowmeter 1, it also shows Flowmeter 10, Flowmeter 11, etc..
My recommendation has always been to modify the expression to include a colon after the flowmeter name, so the outcome is *Flowmeter 1:*
, but it occurs to me that I should explain my reasoning with greater care and detail because it's not necessarily intuitive why this works.
Below, I have recreated the exact scenario with 19 tags labeled Flowmeter 1 through Flowmeter 19, and I've applied the following filter:
This is the result with all flowmeters with a numeric designation that begins with 1 are included even though my filter only says "Flowmeter 1"
Now, if I modify the expression to use a colon, this is the result:
Notice how only Flowmeter 1 is displayed. To understand the reason for this, simply right click on the header, and add the source column to the table to see what is actually being filtered:
As we can see, the source filter is actually filtering the qualified path for the alarm, and in this case, the full qualified path for the alarm we want to see is this:
prov:Sample_Tags:/tag:Flowmeters/Flowmeter 1:/alm:Low Flow Alarm
The *
on either side of the flowmeter name acts as a wildcard permitting any substring in the qualified path that matches the filter to persist in the table. By adding the colon or whatever comes after the unique tag name in the qualified path, it is possible to filter out the unwanted data and achieve the expected result because, in an alarm path, there will always be an :/alm:
denotation that separates the root tag path from the alarm path.