What's wrong in my validation for duplication check?

Hi, for checking user's duplicate input at some specific fields on input form, I used formulas at "Valid if" with error messages.

For example, to check when user input duplicate email or not, at Email column, I added "Valid if" formula as below:

 

ISBLANK(FILTER("User", AND([UserID] <> [_THISROW].[UserID], ISNOTBLANK([Mail]), [Mail] = [_THISROW].[Mail])))

 

My intention for using the above formula is that when user input an email address, it will

I. Filter rows from table User which:

1. Have UserID different than UserID auto-generating at the current input form, AND

2. Have Mail column is not NULL/BLANK, AND

3. Have Mail column with content is exactly same with user currently inputting Mail value at form

II. Then, do check, if the result return no row, it's a valid data, otherwise (if not), it will display/throw error message

However, the real result became a state where error message displayed for every Mail context inputted in the form whether it's duplicate or not (except when it's blank/the Mail text-field is inputted nothing-at-all).

I wonder is there any mistake in my understanding with the formula or expression using at here?

As I'm still unfamiliar with Appsheet expression (and can't test the select/filter result easily like using a SQL statement on SQL server), it's great help if you can show me the reason for any mistake I had and a solution to solve it.

Thanks so much!

0 2 133
2 REPLIES 2
Top Labels in this Space