Skip to main content

Using = as operator instead of @isini in a filter criteria

Hi,
suppose I have an IDEA table where I have a string column. It contains strings and some of them start with a specific character pattern:
 
Column1
Thisisastringentry
anotherone
AB1Cstringcontainsapattern
doesnotcontain
AB1Cthisstringalsocontainspattern
AB1Cagain
 
 
Now I want to filter those entries that contain "AB1C". I would normally use @isini("AB1C",Column2).
 
 
However, I came across a solution which uses Column1="AB1C". Please note that one "=" is used and not "==". I thought this would not work, but I found out that indeed it does work. The same number of records are filtered. Now, I was not sure what this does?
So I wondered what Column1="AB1C" in an IDEA filter criteria does. Is it equal to @isini("AB1C",Column2) or equal to @left(Column1;4)=="AB1C". So in my case it works, just because the pattern is at the beginning, but it would lead to differences in case the AB1C is contained in the middle of a string. I checked this and indeed if the pattern "AB1C" is in the middle of a string (not directly at the beginning) the filter criteria Coolumn1="AB1C" does not detect it whereas @isini does. So it seems Column1="AB1C" is a short version of @left(Column1;"AB1C"). Am I correct? Why does it actually work to use Column1="AB1C"? I would have expected it to be invalid and IDEA will throw an error. But IDEA does something with it, but it is not quite clear for me what it actually does/means? Where is it documented what applying a "=" operator to a string column does in IDEA?
 
 
Thanks for the help!

Brian Element Tue, 02/07/2023 - 06:18

Hi Bert,

You can find your answer in the IDEA help under Comparator.  There is an explanation on when the = is used versus the == and what the expected results would be.  From the description you can see how the single = when used with a character string will work in a similar fashion to the @left function.