web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Shopping Cart in Gallery
Power Apps
Unanswered

Shopping Cart in Gallery

(0) ShareShare
ReportReport
Posted on by 2

Hello how are you? I would like to use the (+) and (-) icons to increment the value inside my text box, the user also has the possibility to manually change it by typing the number.

I managed to do the logic on the outside putting a variable in the Default property of the text box and in the icons I just added or subtracted 1.

But when using inside the gallery all items when I click on the icons are changed and not just the "ThisItem".

What would the logic look like in this case in a gallery?

Thanks and any help will be greatly appreciated.

galeria_incremental.png
Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,641 Moderator on at

    @FranZX99 

    Rather than using a variable, you'll need to Patch the Quantity to the datasource that is used by your gallery. Something like this

    // for + icon
    Patch( yourDataSource, ThisItem, {Quantity: Quantity + 1} )
    
    // for - icon
    Patch( yourDataSource, ThisItem, {Quantity: Quantity - 1} )
    
    
    // for OnChange of Text box
    Patch( yourDataSource, ThisItem, {Quantity: Value(TextInput1.Text) } )

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 846

#2
Valantis Profile Picture

Valantis 532

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard