Can anyone point out where my problem is in t...

expressions
(Rosemary Black) #1

Can anyone point out where my problem is in this espression?

The goal is to use this as a valid if constraint, where the options are Candidates 1-4 but not candidates that have alredy been used in rows with the same useremail() and interview key.

= IN([_THIS],SELECT(LIST([Interview Key].[Candidate 1],[Interview Key].[Candidate 1],[Interview Key].[Candidate 1],[Interview Key].[Candidate 4]),NOT(IN([_THIS],SELECT(Results[Candidate], AND([_THISROW].[Interview Key] = [Interview Key],[Interviewer Email]=useremail()))))))

The error I get is “select has invalid inputs”

Update:

This is my new working expression:

= IN([_THIS], (LIST([Interview Key].[Candidate 1],[Interview Key].[Candidate 2],[Interview Key].[Candidate 3],[Interview Key].[Candidate 4],[Interview Key].[Candidate 5] ,[Interview Key].[Candidate 6] ,[Interview Key].[Candidate 7] ,[Interview Key].[Candidate 8] ,[Interview Key].[Candidate 9] ,[Interview Key].[Candidate 10])- SELECT(Results[Candidate], AND([_THISROW].[Interview Key] = [Interview Key],[Interviewer Email]=useremail()))))

(Tony Fader) #2

@Rosemary_Black You may want to start from this example app: appsheet.com - Distinct value dropdown - Only allow values that haven’t been chosen in dropdown

You’ll need to update the select expression in that example to something like:

SELECT(Request[Equipment], AND([email] <> useremail(), [interview key] <> [_THISROW].[interview key]) Distinct value dropdown - Only allow values that haven’t been chosen in dropdown appsheet.com

(Rosemary Black) #3

@tony Amazing, that you.

I had no idea that subtraction was valid in an expression like this.