2

How To Filter Asset Templates and Grids (version 24)

Both asset templates and grids have a TemplateFilter property that can be used to filter assets based on tag values, tag names, asset names, tag properties, and/or value qualities. In general, tag values must have a Good or Uncertain quality if using a filter based on a tag's value. Below are examples of the different filters that can be applied.

[TagName]>Number

[TagName]>[TagName]

<, >, <=, >=, =, !=, <>    (!= and <> are both equivalent to "not equal to")

Any combination of the above expressions can be joined using &&, ||, and, or.

sortby [TagName]

Sort assets according to the specified tag in ascending order. If descending order is desired, the 'desc' string will need appended to the end of the filter.

 

top #

Return the first "x" number of assets. This is usually used in conjunction with the 'sortby' filter.

contains([%asset%],'string')

Filter on the asset name, in this case, any asset with 'Engine1' in its name. A '!' can be prepended to the beginning to perform a 'not contains', (!contains([%asset%],'string').

!contains([%asset%.Model Type], 'string')

Filter out assets that are double-typed. In the example below, the asset template is set to a "Pump" asset. Some of these assets are double-typed more specifically as "Centrifugal Pump". The following removes the "Centrifugal Pumps" from the template.

contains([TagName.PropertyName],'string')

Filter assets based on the property of a tag.

Quality([TagName])=Decimal quality code

Common decimal quality codes include: 192 (Good), 0 (Bad), 64 (Uncertain), 32768 (NoData).

 Quality filters should be applied first if using them in conjunction with other filters.

2 replies

null
    • albertoesparza
    • 2 wk ago
    • Reported - view

    Hello!
    do you know if there's a way to filter in an aggregate fashion?
    Sortby [BOP.EPI_TOTAL_Calc] asc top 20
    I have this sorting, but it's sorting the instant value of the BOP.EPI_TOTAL but the grid has the averaged values. 

    how could I filter the weekly average that's being shown on a grid??

    regards!
     

      • smason
      • 2 wk ago
      • Reported - view

      Hi  ,
      Unfortunately the filtering is based upon the current value. If you would want to filter on an aggregated value, you would have to create a calc tag that uses that aggregation.