ValidIf for duplicate time entries

Hi There,

I have a table “Timesheet” where staff members add timesheet entries and I want to prevent duplicate entries in the same time slot. I was hoping to do this by using the valid if and just preventing a [Start Time] on the same [Date] by the same [Full Name].

I have tried this but it is not working:

Not(In([_THIS], SELECT(Timesheet[Start Time], AND([Start Time] = [_ThisRow].[Start Time],[Date] = [_ThisRow].[Date],[Full Name] = [_ThisRow].[Full Name]))))

Any help??

A cursory look at your expression seems fine.

How is it not working? You can still enter duplicate Start Time entries?

1 Like

Probably because you’re comparing the start times as well. It’d be extremely hard to have 2 exactly same start times from manually created records.

Also, just search this forum for “prevent duplicates”, there have been dozens of posts about this.

2 Likes