Don't allow to submit duplicate value in column , if already exist in table.

I don’t want to allow users to submit duplicate records based on two column values, I am trying to do if today's Date and class Attendance record exist then don't allow duplicate in google sheet. The below expression i have try but no luck.

Valid If Condition.

FILTER("Attendance", 

  AND(Attendance_Date] = [_THISROW].[Date],[Attendance_Class] = [_THISROW].[Att_Class]) )

 This expression not working. Can someone please help me out.

Thanks.

Solved Solved
0 1 94
1 ACCEPTED SOLUTION

I think that your expression returns a list of row keys that match the new row's date and class. However, it sounds like you want the opposite. Try wrapping your expression in an ISBLANK function.

However, even then you'd encounter a validation error if you ever need to edit an existing row. So, you'd need to exclude the current row from the list that the expression is confirming to be blank. To account for that, you can Subtract values from a list - AppSheet Help.

There are lots of community posts on this topic, including  How to Prevent Duplicate Records - Google Cloud Community

View solution in original post

1 REPLY 1

I think that your expression returns a list of row keys that match the new row's date and class. However, it sounds like you want the opposite. Try wrapping your expression in an ISBLANK function.

However, even then you'd encounter a validation error if you ever need to edit an existing row. So, you'd need to exclude the current row from the list that the expression is confirming to be blank. To account for that, you can Subtract values from a list - AppSheet Help.

There are lots of community posts on this topic, including  How to Prevent Duplicate Records - Google Cloud Community

Top Labels in this Space