Hi @Anonymous ,
Could you please share a bit more about the formula you used for creating repeating Gallery?
Which data source does the Repeating Table (Gallery) would save data to?
Based on the needs that you mentioned, I think the collection could achieve your needs. Please consider take a try with the following workaround:
Set the OnStart property of App or the OnVisible property of current Edit screen to following:
Clear(RepeatingTable);
Collect(
RepeatingTable,
{
Id: CountRows(RepeatingTable) + 1,
PartNo: "",
PartDescription: "",
QTY: "",
'Unit Price': "",
'Net Weight(KG)': "",
'Total Weight(KG)': "",
'MFG Name': "",
'MFG Address': ""
}
)
Within your Edit form screen, set the Items property of the Gallery to following:
RepeatingTable
set the OnSelect property of the "+" icon inside the Gallery to following:
Collect(
RepeatingTable,
{
Id: CountRows(RepeatingTable) + 1,
PartNo: "",
PartDescription: "",
QTY: "",
'Unit Price': "",
'Net Weight(KG)': "",
'Total Weight(KG)': "",
'MFG Name': "",
'MFG Address': ""
}
)
set the OnSelect property of the "Save" icon to following:
Patch(
RepeatingTable,
LookUp(RepeatingTable, Id = ThisItem.Id),
{
PartNo: PartNoTextBox.Text,
PartDescription: PartDescriptionTextBox.Text,
QTY: QTYTextBox.Value,
'Unit Price': UnitPriceTextBox.Text,
'Net Weight(KG)': NetWeightTextBox.Text,
'Total Weight(KG)': TotalWeightTextBox.Text,
'MFG Name': MFGNameTextBox.Text,
'MFG Address': MFGAddressTextBox.Text
}
)
If you want to submit the RepeatingTable collection back to your SP List when you submit your form data successfully, please consider set the OnSuccess property of the Edit form to following:
ForAll(
RepeatingTable,
Patch(
'Target SP List', // represens the SP List you want to save your repeating table collection data back to
Defaults('Target SP List'),
{
PartNo: Value(RepeatingTable[@PartNo]),
PartDescription: RepeatingTable[@PartDescription],
QTY: Value(RepeatingTable[@QTY]),
'Unit Price': Value(RepeatingTable[@'Unit Price']),
'Net Weight(KG)': Value(RepeatingTable[@'Net Weight(KG)']),
'Total Weight(KG)': Value(RepeatingTable[@'Total Weight(KG)']),
'MFG Name': RepeatingTable[@'MFG Name'],
'MFG Address': RepeatingTable[@'MFG Address']
}
)
)
Please consider take a try with above solution, re-load your app, then check if the issue is solved.
Best regards,