I have several galleries in my app that are used as an editable grid. As an item is selected in the gallery/grid a context variable is set with the id of that item, if the context variable id matches the id of an item in the gallery that item and the controls associated with that item become editable:


The Onselect property for the save icon seen in the screenshot above is where are patch is located. please see code below:
Patch(
colEquip,
{EquipmentId: editrecord},
{
EquipmentMaintenanceStatusId:mtequipgridgalmaintstatus_dd.Selected.EquipmentMaintenanceStatusId,
EquipmentMaintenanceStatusName:mtequipgridgalmaintstatus_dd.Selected.EquipmentMaintenanceStatusName,
TestTankStatusId:mtequipgridgaltesttankstatus_dd.Selected.TestTankStatusId,
TestTankStatusName:mtequipgridgaltesttankstatus_dd.Selected.TestTankStatusName,
MaintenanceEstRTSDate: mtequipgridgalrts_date.SelectedDate,
MaintenanceComments: mtequipgridgalmaintcomments_txt.Text,
Bay: mtequipgridgalbay_dd.Selected.BayNumber,
Priority: mtequipgridgalpriority_dd.Selected.Value,
ModifiedBy: User().FullName,
ModifiedDate: Now()
});
Patch(
'[boc].[Equipment]',
{EquipmentId: editrecord},
{
EquipmentMaintenanceStatusId:mtequipgridgalmaintstatus_dd.Selected.EquipmentMaintenanceStatusId,
TestTankStatusId:mtequipgridgaltesttankstatus_dd.Selected.TestTankStatusId,
MaintenanceEstRTSDate: mtequipgridgalrts_date.SelectedDate,
MaintenanceComments: mtequipgridgalmaintcomments_txt.Text,
Bay: mtequipgridgalbay_dd.Selected.BayNumber,
Priority: mtequipgridgalpriority_dd.Selected.Value,
ModifiedBy: User().FullName,
ModifiedDate: Now()
});
UpdateContext({editrecord:""});
As you can see I have 2 patches, one to the collection used to display the data in the app and one to the database to update the SQL back end. This function has worked for almost a year now and just recently seems to be failing intermittently where the collection gets updated but the SQL back end does not. No changes to the code have been made recently, just started failing on its own.
Most of the cases seem to involve a dropdown populated by a sql view or collection created from a sql view. When a patch includes a value selected from such a dropdown the patch fails. Furthermore there is no error message, the data simply just does not send.
Can I please get some assistance on how to resolve this issue? Has something changed with patches or using sql view data connections?