Hi
Can anyone see why this wouldn't work correctly. Instead of updating the existing record, it is patching a new one each time. Upon choosing a new date in the gallery, I store 'existingdate' by setting a variable on the ON CHANGE function of the date picker and use the code: setExistingDate(ThisItem.FROM). This works and stores the previously stored date. I also do the same for the END DATE.
Then, to update the record (which is in a different data source):
Patch(CRUD_3S,
LookUp(CRUD_3S, CrewName=Gallery2.Selected.Name && DAY_TYPE=3 && StartDate = ExistingStartDate && EndDate = ExistingEndDate),
{StartDate: DatePickerFROM.SelectedDate,
EndDate: DatePickerTO.SelectedDate})
I can see that the existing dates are being stored correctly and I can see the record in the "CRUD_3S" data table with all of the other criteria met (crewname, day type etc.). However, each time, a new record is created?
Many thanks!