I have a gallery where I add items to a shopping cart style collection. The code to add the item from the gallery to the collection is:
If(
IsBlank(LookUp(colQuote, PID = ThisItem.ID)),
Collect(colQuote,
{
PID:ThisItem.ID,
Product:ThisItem.Title,
Price:Value(ThisItem.PriceExVAT),
HMCode:ThisItem.HMCode,
Category:ThisItem.Category,
ProductQuantity:1,
SubTotal: Value(ThisItem.PriceExVAT) * 1
}));
However, I also want to able to add multiple items to a collection with one click. So I've created buttons with a + icon to do this OnSelect.
Instead of hard coding it to the OnSelect, I want to store these items in a SPList "BoilerFittingsPack" and then depending on which of the three buttons is clicked (buttons would filter the Category) and add all items within that category to the collection.
The BoilerFittingsPack schema would be similar as the code above with same column names.
How would I go about this to achieve it?