
Announcements
ForAll(
Filter(
colUpdateTimesheetLines As Timesheet,
!IsBlank(Timesheet.TimesheetID) // Identify existing records
),
With(
{
ExistingRecord: LookUp('DEV-TIMESHEETS', cr359_timesheetid = TimesheetID)
},
Patch(
'DEV-TIMESHEETS',
ExistingRecord,
{
Owner: CurrentUser,
Sun: Sun,
Mon: Mon,
Tues: Tues,
Weds: Weds,
Thurs: Thurs,
Fri: Fri,
Sat: Sat,
'Hours Worked': Total
}
);
Notify("Existing record updated with TimesheetID: " & TimesheetID, NotificationType.Information)
)
);
ForAll(
Filter(
colUpdateTimesheetLines,
!IsBlank(TimesheetID)
) As Timesheet,
With(
{
ExistingRecord:
LookUp(
'DEV-TIMESHEETS',
cr359_timesheetid = Timesheet.TimesheetID
)
},
Patch(
'DEV-TIMESHEETS',
ExistingRecord,
{
Owner: CurrentUser,
Sun: Sun,
Mon: Mon,
Tues: Tues,
Weds: Weds,
Thurs: Thurs,
Fri: Fri,
Sat: Sat,
'Hours Worked': Total
}
);
Notify(
"Existing record updated with TimesheetID: " & TimesheetID,
NotificationType.Information
)
)
);