Equivalent for "not in" operator in connect?

What’s the equivalent for the “not in” operator in connect because it doesn’t work.

ExampleTbl where Status not in ['A', 'F', 'K'] //doesnt work
ExampleTbl where Status in ['A', 'F', 'K'] //works
ExampleTbl where Status != 'A' or Status != 'F' or Status != 'K' //works

Is there any way I can shorten the where the clause on third line from the example?

Hello! Your question is correctly framed. We have the “not” and “in” operators, but we do not have the compound “not in” operator.

You can, however, do it like this:
ExamplesTbl where not (Status in ['A', 'F', 'K'])

Note that the “not” operator has higher precedence (binds tighter) then “in”, similarly to how multiplication precedes addition in math. This means that those parentheses around (Status in […]) are mandatory. Without these parentheses, the expression would be understood as (not Status) in [...].

2 Likes

@fabianlidman answer is correct. But, you may also use:

ExampleTbl except where Status in ['A', 'F', 'K']
1 Like