HI @EpicTriffid ,
Could you please share a bit more about your scenario?
Do you want to add one unit with multiple delivery styles before you press submit button to submit it to your SP list?
If you want to add one unit with multiple delivery styles before you press submit button to submit it to your SP list, I think the combination of Collection, ForAll function and Patch function could achieve your needs.
On your side, you could save the Units records from your SP list into a Collection when you load your app, then use the Collection as data source within your Gallery. When you add new Unit record via pressing a "+" button, you need to add record into this Collection firstly. When you press the "Submit" button, patch all new records within your Gallery into your SP list together.
I have made a test on my side, please take a try with the following workaround:
Set the OnStart property of the App control to following:
ClearCollect(LocalUnitRecords, 'YourSPList')
set the Items property of the Gallery to following:
LocalUnitRecords
Add a "+" button along side the "Submit" button, set the OnSelect property of the "+" icon to following:
Patch(
LocalUnitRecords,
Defaults(LocalUnitRecords),
{
UnitName: UnitNameTextBox.Text,
UnitSize: UnitSzieDropdownBox.Selected.Value,
DeliveryStyle: DeliveryStyleDropdownBox.Selected.Value,
Hours: HoursTextBox.Text,
...
}
)
Set the OnSelect property of the "Submit" button to following:
ForAll(
RenameColumns(Gallery1.AllItems, "UnitName", "UnitName1", "DeliveryStyle", "DeliveryStyle1"),
If(
IsBlank(LookUp('YourSPList', UnitName = UnitName1 && DeliveryStyle = DeliveryStyle1)),
Patch(
'YourSPList',
Defaults('YourSPList'),
{
UnitName: GalleryUnitNameBox.Text,
DeliveryStyle: GalleryDeliveryStyleBox.Selected.Value,
...
}
)
)
);
Refresh('YourSPList');
ClearCollect(LocalUnitRecords, 'YourSPList')
Note: The GalleryUnitNameBox, GalleryDeliveryStyleBox, ... represents the Text Input box, Dropdown box, ... within the Gallery (Gallery1). The Gallery1 represents the Gallery in your app.
More details about the ForAll function and Patch function, please check the following article:
ForAll function
Patch function
Best regards,