I want to build a quote tool. I will use a collection called colSelectedProducts. I want to prohibit users from adding too many products from certain categories.
ClearCollect( colSelectedProducts, { Item: "Denim Jeans", Category: "Pants", Quantity: 2 }, { Item: "Rolex Watch", Category: "Watch", Quantity: 1 })
I'll have a table with {Category: "Jeans",Limit: 5}.{Category:"Watch",Limit:1} to set the limitations per category.
How do count the products in the colSelectedProducts Collection to make sure that there aren't, for example, 2 watches?
Hi @oguruma ,
The solution might be the CountRows() function:
CountRows(Filter(colSelectedProducts, Category="Watch"))
User | Count |
---|---|
255 | |
110 | |
90 | |
51 | |
44 |