Hi,
I'm working on an inventory app and i need to be able to add and remove items from a collection as they're selected from a gallery. I'm getting stuck on updating a record in a collection, which in my scenario is the quantity of items selected from the gallery.
Users should be able to click on the same items multiple times and those items will be added to the collection and needs to show the latest item number, as shown below. How can I update just one row in a collection when clicked a button.
First is the gallery which has the items of our inventory. I want to add one to my cart.
The item is added in my cart and now there is 36 left in the inventory
I have added an extra item of the same to my cart, which tells me there is now 35 left in our inventory
But can I get the amount of inventory in the previous added item to change to 35?
Solved it with
Collect(Cart, {HardwareType:ItemOverview.Selected.HardwareType, Amount:Subtitle1.Text -1}); Patch(Stock,ItemOverview.Selected,{Amount:ThisItem.Amount-1});
What if you try to add to your 'Add' icon'.OnSelect existing code:
// your existing code here first;
ForAll(Filter(Cart, HardwareType = ItemOverview.Selected.HardwareType),
Patch(Cart, ThisRecord, {Amount: ItemOverview.Selected.Subtitle1.Text -1})
);
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473