Checking for duplicates in a subform
I have an app with a mainform, and within that is a subform (see screen grab) which contains rows of employee names along with hours worked per day by each.
I am attempting to create a validation script which will cancel submission of a new or updated record if a duplicate employee name is found.
I've tried a couple of variations by defining a variable and using COUNT, but depending on how I do it I always get an error saying the form doesn't exist, or the variable doesn't exist.
I'm fairly new to Deluge, and I think the problem is because although I am trying to validate the main form, the fields I'm interested in are part of the subform.
Would appreciate if someone could let me know whether what I'm trying to accomplish is in fact possible, and if so how I'd go about doing it.
Many thanks.
Joe