About EasyMorph Tutorials & Examples Web-help

Use a list to use as "IN" condition in SQL


#1

Hi,
Is there a way to use IF conditions pulling an array from a List?

Instead of having IF(contains([field X], “1”) or contains([field X], “2”) or contains([field X], “3”))

the list would be {1,2,3} and we could use “IF [field X] in List Y then”, this would simplify much better the IF conditionals and also the maintenance of it.

Thank you :).
Jorge


#2

Hi Jorge,

You can try to use the in function:

in('foo', 'foo|bar|baz', '|')


#3

Ah thank you very much, I somehow missed that in the formulas :).