cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nithishguptak
Helper II
Helper II

Seperate values of each item in a Gallery

Hello all,

 

So I have been trying to implement a shopping cart, how can I seperate each row, so only the selected value is incremented, as of now it increments all the rows. 

 

Thank you for your time

powerapps1.PNG

1 REPLY 1
Anonymous
Not applicable

Hey,
You could add the quantity column to the table where you store the order and which is used by the gallery.

The buttons then instead of incrementing a variable would be used to update a quantity in a given row. 

For example:

Patch(orderCollection,ThisItem,{quantity:ThisItem.quantity+1})

Alternatively you could also use Update or UpdateIf. Here's some more info:
https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/function-patch 
https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/function-update-updateif

Best regards,
Matt

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,365)