I have a list of names in a REF column. I wou...

(Jonathon Sinclair) #1

I have a list of names in a REF column. I would like to limit my users to entering only one REF record per name. Therefore, I would like to apply a valid_if statement to the REF column to remove options for which a record already exists.

I am wracking my brain trying to get this to work… I have tried so many combinations of SELECT() and IN() that I’m sure I’m working in circles at this point.

Has anyone done this before that can give some insight?

(Praveen Seshadri (AppSheet)) #2

Assuming the table is T and the Ref column is RefName and it references T2, then the values that already exist are T[RefName]

So what you want is T2[KeyColumn] - T[RefName]

which is the same as

SELECT(T2[KeyColumn], NOT(IN([KeyColumn], T[RefName])))

(Jonathon Sinclair) #3

Cheers Praveen, working.