I have two data verse tables:
- Table 1 collects the employee number, job number, date worked and hours worked
- Table 2 collect the employee number, job number, date worked, work start time, work stop time, clock in method, clock out method and then an hours field which is calculated based on the work start time and work stop time.
I have a screen that allows for the user to submit the job number, date worked and hours worked for the week in a gallery which populates a collection and then ultimately patches table 1. I've created the second collection for Table 2 with the overlapping data from the collection for table 1 (employee number, job number, date worked), but am stuck on trying to patch the work start time with the date worked and a default start time of 7:00 am.
This is my current formula and although it's not throwing any errors, it doesn't look like its able to process that for each record I need to match the date worked to update the work start time:
ForAll(WeekTimeSubmissionGallery.AllItems, UpdateIf(Table2Collection,ThisRecord.DateWorked=DateWorked, {WorkStartTime: DateTimeValue(Text(ThisRecord.DateWorked) && "7:00 AM")}));