Hi @Anonymous,
Could you please share a bit more about your scenario?
Do you want to copy the submitted record into your Gallery when one new entry is submitted/patched within the Edit form of your app?
Could you please share a bit more about the TestMaterialDataCard that you mentioned?
Based on the formula that you provided, I think there is something wrong with it. The UpdateContext function is used to initialize a context variable (e.g. BATCH, AMOUNT, etc) within an app. But on your side, once one new entry is submitted in your Edit form, the corresponding context variable would be updated. So within your Gallery, it could only display the latest submitted entry.
As an alternative solution, please take a try with the following workaround:
Set the OnVisible property of the first screen of your app to following:
ClearCollect(RecordsCollection, Table1_7)
Within the Edit/New screen, set the OnSelect property of the "Submit" button to following:
Patch(
Table1_7,
Defaults(Table1_7),
{
BATCH:BatchDataCard.Text,
AMOUNT:TotalAmountDataCard.Text
}
);
ClearCollect(RecordsCollection, Table1_7);
Navigate(EnterTestItemDetails_2,ScreenTransition.Fade)
Set the Items property of the Gallery control to following:
RecordsCollection
Then if you want to reference the property within the RecordsCollection in your Gallery, you could use the following formula:
ThisItem.ColumnName
More details about the Patch function in PowerApps, please check the following article:
Patch function
Best regards,
Kris