Hi @Kenneth1 ,
Do you add a "Check mark" icon within your Gallery?
Do you also want to submit multiple rows back to your SP list at same time with one button click?
Further, could you please share more details about the formula typed within the Items property of the Gallery?
Based on the needs that you mentioned, I have made a test on my side, please consider take a try with the following workaround:
Set the Items property of the Gallery to following:
Site_Planned_Metrics
Within the Gallery, set the Default property of the SAFETY Text Box to following:
ThisItem.SAFETY
set the Default property of the PEOPLE Text Box to following:
ThisItem.PEOPLE
set the Default property of the QUALITY Text Box to following:
ThisItem.QUALITY
set the Default property of the DELIVERY Text Box to following:
ThisItem.DELIVERY
set the Default property of the COST Text Box to following:
ThisItem.COST
Set the Visible property of the "Check mark" icon to following:
If(
txtSAFETY.Text <> ThisItem.SAFETY || txtPEOPLE.Text <> ThisItem.PEOPLE || txtQUALITY.Text <> ThisItem.QUALITY || txtDELIVERY.Text <> ThisItem.DELIVERY || txtCOST.Text <> ThisItem.COST,
true,
false
)
Set the OnSelect property of the "Check mark" icon to following:
Patch(
Site_Planned_Metrics,
ThisItem,
{
SAFETY: txtSAFETY.Text,
PEOPLE: txtPEOPLE.Text,
QUALITY: txtQUALITY.Text,
DELIVERY: txtDELIVERY.Text,
COST: txtCOST.Text
}
);
If( // Show up a message when you update record successfully
IsEmpty(Errors(Site_Planned_Metrics)),
Notify("Updated Successfully!", NotificationType.Success),
Notify("Updated Fail!", NotificationType.Error)
)
In addition, if you also want to submit multiple rows at the same time with a single button, please consider take a try with the following workaround:
Add a button outside the Gallery, called "Submit". Set the OnSelect property of the "Submit" button to following:
ForAll(
RenameColumns(Gallery1.AllItems, "ID", "ID1"),
Patch(
Site_Planned_Metrics,
LookUp(Site_Planned_Metrics, ID = ID1),
{
SAFETY: txtSAFETY.Text,
PEOPLE: txtPEOPLE.Text,
QUALITY: txtQUALITY.Text,
DELIVERY: txtDELIVERY.Text,
COST: txtCOST.Text
}
)
);
If( // Show up a message when you update record successfully
IsEmpty(Errors(Site_Planned_Metrics)),
Notify("Updated Successfully!", NotificationType.Success),
Notify("Updated Fail!", NotificationType.Error)
)
Please consider take a try with above solution, then check if the issue is solved.
More details about the ForAll function in PowerApps, please check the following article:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-forall
Best regards,