Hi all! I have the below gallery that will be used to select various items and assign expense allocation percentages to each item. Right now I'm only patching/collecting this data to a collection. Once i finish all of the forms I'll do a ForAll patch to several SharePoint lists, but for right now I'm just saving this data to a collection. As you can see in the image below I have the "+" icon which will collect/patch the data to the CostCenterCollection and add another line automatically. Next i have the "Save" icon which is just a patch formula to my collection and doesn't add another line. What I'm afraid of is someone entering say 5 lines and if they go change a line they've entered and they forget to hit the individual "+" or the "save" button then there most recent change won't be made. Is there a way to create a overall save button that basically loops through and clicks all the save buttons or is there a formula to patch or update the entire gallery to the collection to ensure the last entry was collected? Also, should this button be inside the gallery or outside the gallery?
Code for "+"
Patch(
CostCenterCollection,
ThisItem,
{
CostCenter1: CostCenterCC.Selected.Value,
Allocation1: Value(AllocationCC.Text)
}
);
Collect(
CostCenterCollection,
{
CostCenter1: "",
Allocation1: 0
}
)
Code for "Save"
Patch(
CostCenterCollection,
ThisItem,
{
CostCenter1: CostCenterCC.Selected.Value,
Allocation1: Value(AllocationCC.Text)
}
)
Variables:
Collection = CostCenterCollection
Collection Field Columns = CostCenter1 & Allocation1
Dropdown box in the gallery for collecting and entry = CostCenterCC
Text input in the gallery for collecting and entry = AllocationCC
