The benefit of using a reference vs. an expression

Hi everyone, hope things are going well? This is just a quick and simple question relating to recommended approaches for how to structure expressions in a ‘Valid If’ column. So for this example I’m using the ‘Valid If’ to match a column entry with a list in another table. I’ve found two ways to do it,

  1. use a referenced column (in this case called ‘existing products’) with a contains expression, e.g CONTAINS([Existing Products], [Product])

  2. I skip the referenced column and just use a Select expression instead, e.g CONTAINS(SELECT(Customers[Products], [Customer] = [_THISROW].[Customer]), [_THIS])

My question is, which method is more efficient for Appsheet to process? I don’t mind either approach personally, but I would rather use the best option if possible.

Thanks for reading!

D

Why are you using CONTAINS()?

1 Like

References are most stable , efficient and easy to use overall , and will give you a lot of other interesting oportunities to use them

2 Likes

Thanks for the reply OptimiX_XcrY.

1 Like

Thanks for the tip Steve, I haven’t used the IN() expression much, but I see its already better at handling ‘Valid If’ conditions and even helps in simplifying the Enum list column (it automates it, unlike the former example I provided).

Great stuff man, love this!

2 Likes