Overhauled and added simple examples. Any sug...

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

0 5 340
5 REPLIES 5

Just used this! Thanks!

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.

@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โ€))))

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โ€)))

+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.

Top Labels in this Space