cancel
Showing results for 
Search instead for 
Did you mean: 

BLS Generic Filter/Sort functionality

Former Member
0 Kudos

Forum,

Does anyone know if it is possible to use wildcards in the GenericFilterSort Filter Value? Using 11.5 SP6. Or is there another method to filter out unwanted data?

Roger DeWeese

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

Have you tried linking an expression into the field shown by the configure dialog? There are a boatload of expressions for strings in the drop down list, perhaps you could work something there and just link it in.

Former Member
0 Kudos

Jeremy, AFAIK you can't use expressions (other than those supported by XSLT) in the Generic Sort/Filter action, since it is using XSL expressions under the hood to achieve the filtering.

Answers (2)

Answers (2)

Former Member
0 Kudos

Rick,

Absolutely I agree... I have done that is the past and will have to employ that concept now.

The problem stems around the IP21 query template mask feature. We have two groups of tags in a historian. The first group has a "W_" as a prefix where the second group has no prefix. I am attempting to develop a BLS trans that will allow a user to pass a mask which will identify which tag names to return. If the user wants the second group of tags the mask will be null or zero length. That type of mask of course returns all tags. I need some way to exclude the first group ("W_").

I tried the query mask, but that only allows % even though the help indicates you can use ranges [a-c] or not ranges [^a-c].

The alternative is to return all the tags then use the filter/sort in BLS to apply the mask which I am persuing now.

Of course the easiest would be to connect to IP21 using odbc and then use a sql query against the def tag. Don't really want to do that if possible.

Roger

Former Member
0 Kudos

Roger, since the underlying sorting and filtering uses XSLT, only simple comparisons are supported. However, a technique that I've used quite often is to use the CalculatedColumns action to provide a very complex filtering expression (can involve the values of multiple columns and the full set of functions supported by BLS), and then filter on the results of that Calculated column.

So, for example, if I have column A, B, C, I could create a calculated column "IncludeMe" using something like:

if(A < 200,0, if(substring(B,1,1) == "X",0, if(C > 300000, 0, 1) ) )

Then filter on records where IncludeMe == 1.