Subject: RE: View Selection Formula - @Contains
Edit: Too late, once again …
What else is there? Well, what about a single value (technically) that holds two values (logically). A single value field containing something like “PBCT;CVS” will obviously not return, what you would want to, whereas @Contains still would. That was easy, wasn’t it?
“I’ve had just as much luck without the asterisk: SELECT Ticker = “PBCT”:“CVS”:“QCOM”:”…"
Well, maybe, if you pick your example carefully. The simple equality operator performs a pairwise equality check. If one of the lists is shorter than the other, the last element of the shorter list will be repeated until both lists are of the same length. Then, every value in the first list is compared to its counterpart on the same index in the other list. If at least one pair match is found, the return value is True.
“A”:“B”:"C:“D” = “E”:“D” ==> True
“A”:“B”:"C:“D” = “D”:“E” ==> False
“A”:“B”:"C:“D” = “E”:“B”:“D”:“C” ==> True
“A”:“B”:"C:“D” = “B”:“C”:“D”:“E” ==> False
The permutation equality operator on the other hand is not that picky. As long as any element in list one matches any element in list two, the return value is True.
“A”:“B”:"C:“D” *= “X”:“D”:“X” ==> True
As long, as one list is always a single value, there’s no difference.
“A”:“B”:“C”:“D” = “D”
is the same as
“A”:“B”:“C”:“D” = “D”:“D”:“D”:“D”
is the same as
“A”:“B”:“C”:“D” *= “D”:“D”:“D”:“D”
The one value in list two is always compared to every single element in list one. However, if there is the slightest chance, that your single value in list two COULD be a list as well, the permutation equality operator yields the more robust results (if this logic is what you want to achieve).
And it’s all in Designer help …