Combining Valid_if expressions? Hi, I am usi...

expressions
(D. Robert Charlon) #1

Combining Valid_if expressions?

Hi, I am using the following expression as a Valid_if column constraint to generate a list of values from another table, however the resulting list is too broad. I need to filter/narrow down that list based on the value of another column in the same table (Acq. Chart). How would I go about doing that?

Here is the expression I am currently using: IN( [_THIS], SELECT(Acq. Chart[Target], [_THISROW].[Goal ID] = [Goal ID]))

I am new to appsheet. Any help would be greatly appreciated.

(Bellave Jayaram) #2

You don’t need the IN part, just use the SELECT formula.

(D. Robert Charlon) #3

@Bellave_Jayaram You are right, that part was completely unnecessary. So now how do I go about further filtering the resulting list? Can I add on another expression or parameter? What would that look like?

Thanks

(Bellave Jayaram) #4

You can add more conditions in the filter as in: SELECT(Acq. Chart[Target], AND([_THISROW].[ColName] = [ColName], [_THISROW].[Goal ID] = [Goal ID]))

(D. Robert Charlon) #5

@Bellave_Jayaram I tried adding a filter condition for a column value in the referenced table (I hope I’m getting this terminology right). The column is [Status] and the value I’m looking for is “Current”. Based on the initial condition, which returned 5 results, the new condition should filter the list to 1, but I’m still getting the same 5 results. Here is the expression:

SELECT(Acq. Chart[Target], AND [_THISROW].[Goal ID] = [Goal ID], [Status] = “Current”)

What am I doing wrong?

Thanks in advance

(Bellave Jayaram) #6

You are missing an open paren after AND and a close paren at the end.

(D. Robert Charlon) #7

It worked! Bless your heart. I’ll be able to sleep tonight. Thank you.

+1000

(Bellave Jayaram) #8

You are welcome. Hope you can now build many more apps🙂