A better expression

This expression is currently working for me,

AND(OR([Type]="External",[Type]="Overseas",[Type]="Emergency Crew"), [Status] = "Out")

I believe there's a better way to write this using the IN() or LIST() expression. I tried the below but it's not working out.

AND(IN(ANY(Loans[Type]),{'External','Overseas','Emergency Crew'}), [Status] = "Out")

Can someone help out? Just trying to learn to write better expressions.

Thank you

Solved Solved
0 2 199
1 ACCEPTED SOLUTION

Here's an expression using the functions you cite. If you didn't already, review each function's help article for details of its syntax, argument data types, and returned value data type.

  • Your need is a good use for IN.
  • ANY isn't applicable.
  • LIST is equivalent to your use of braces.
AND(IN([Type], LIST("External", "Overseas", "Emergency Crew")), [Status] = "Out")

 

View solution in original post

2 REPLIES 2
Top Labels in this Space