Overhauled and added simple examples. Any sug...

(Steven Coile) #1

Overhauled and added simple examples. Any suggestions for more-complex examples?

(Ricardo Gonzalez) #2

Just used this! Thanks!

(Andrew Eills) #3

Steve, In your NOT(IN([Color]), {“Orange”, “Red”}) example, is it more efficient than the equivalent experession you provide: AND(([Color] <> “Orange”), ([Color] <> “Red”))?

It looks more efficient, but I don’t know for sure.

(Steven Coile) #4

@Andrew_Eills For user input validation, the difference in computational efficiency of the

two is insignificant. That said, I prefer IN() because it adapts to changes easier: it’s easier to add and remove list elements than it is to add and remove sub-expressions. I can also use IN() in the same way with a list generated with SELECT(): e.g. NOT(IN([Color], SELECT(Products[Color], ([Status] = “Discontinued”))))

(Levent KULAÇOĞLU) #5

To support +Steve Coile, I would like to remind one thing at this point: Using IN(…) expression alone in a Valid_if property, will generate a list and create a dropdown in that Column in your Form UX. If you want to use IN expression in a Valid_if property of a column to verify the user entered data, you should explicitly enclose it with an AND expression i.e.

AND(TRUE, IN([Color],SELECT(Products[Color], [Status] = “Discontinued”)))

(Levent KULAÇOĞLU) #6

+Steve Coile well I couldn’t been able to reproduce it either. Maybe something had changed because a couple of weeks ago it was producing a list though enclosed with NOT. Sorry for the mis-direction, thanks for informing me as well. I have edited my response and deleted my reply to you so no any member get confused with it.