With(
{_Item: GalleryName.Selected},
Collect(
colLineItemsUpdates,
{
Vendor: _Item.txt_Vendor.Value,
'Item ': _Item.txt_Item.Value,
Description: _Item.txt_Description.Value,
Quantity: _Item.num_Input_Quantity.Value,
Price: _Item.num_Input_Price.Value
}
)
)
ForAll(
YourGalleryName.AllItems As _Items,
Collect(
colLineItemsUpdates,
{
Vendor: _Items.txt_Vendor.Value,
'Item ': _Items.txt_Item.Value,
Description: _Items.txt_Description.Value,
Quantity: _Items.num_Input_Quantity.Value,
Price: _Items.num_Input_Price.Value
}
)
);
ForAll(
YourGalleryName.AllItems As _Items,
Collect(
colLineItemsUpdates,
{
Vendor: _Items.txt_Vendor.Value,
'Item ': _Items.txt_Item.Value,
Description: _Items.txt_Description.Value,
Quantity: _Items.num_Input_Quantity.Value,
Price: _Items.num_Input_Price.Value
}
)
);
ForAll
to Iterate Over All RowsTableGallery
), you can iterate through each row and collect data:TableGallery.AllItems
ensures all rows are included.Clear(colLineItemsUpdates)
before adding rows to avoid duplication.Option 2: Append Data for Individual Rows
If you're adding data row-by-row (e.g., from a form), use the Collect
function while ensuring previous rows aren't overwritten:
Ensure this is triggered for each row added to the table.
Option 3: Patch Collection to Update Specific Rows
If you want to update existing rows in the collection instead of adding duplicates:
Patch(
colLineItemsUpdates,
LookUp(colLineItemsUpdates, ID = RowID), // Finds the row to update
{
Field1: InputField1.Text,
Field2: InputField2.Text
}
)
This approach is useful if your rows have unique identifiers (RowID
).
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1