Skip to main content

Notifications

Power Apps - Power Apps Pro Dev & ISV
Answered

Problem - Add an Incremental Button to a Gallery

(0) ShareShare
ReportReport
Posted on by 6
Hello Friends,

I am a complete beginner at Power Apps.
Please help me.
I have a gallery called GalProduct_2 in which I have:
                Products: - in TitleProduct_2
                Text Input Box: ProductQty_2
                Increment Button : Button1_2
                The data source is ca;;es StoresProducts and is a Shorepoint list.

The gallery is flexible in the number of Items and input boxes it shows. If I have 5 products, I show 5 input boxes and 5 buttons.
I wan when the user clicks on the button to increment the value in the input box by 1
But just that box.
I got it so it increments all values by 1
Please make the steps real easy please.
If the solution works I will pay $20 by PayPal
Thank you!
 
 
  • Verified answer
    AndrianaO Profile Picture
    AndrianaO 161 on at
    Problem - Add an Incremental Button to a Gallery
    Hi @DB-20120449-0, I'm glad to hear that I helped you and thank you for the kind words! 
     
     
    I would also appreciate it if you could verify my answer. To do so, you need to check "Does this answer your question?" at the bottom of my reply with the solution.

    Happy Holidays from Ottawa, Canada! :)
  • DB-20120449-0 Profile Picture
    DB-20120449-0 6 on at
    Problem - Add an Incremental Button to a Gallery
    Yay. That worked !!!
     
    Thank you, thank you.
     
    May I have your paypal and I'll transfer the 20. You helped me greatly!!!
     
    I just checked your linked in account.
     
    You must be very smart!!
     
    Happy holidays from Vancouver bc canada!!
  • AndrianaO Profile Picture
    AndrianaO 161 on at
    Problem - Add an Incremental Button to a Gallery
    Each SharePoint list has a unique column ID (it is just not visible by default), so everything should work fine. The only extra suggestion is to put Filter in the first formula, but it is not mandatory
     
    ClearCollect(colNumber,Ungroup(ForAll(YourFilterStatementFromGalleryItems,Table({ID: ThisRecord.ID, Number: 0})),Value))

    Also note, that in order for OnVisible property to work while you're testing the app you need to start testing from some other screen and then navigate to the screen with gallery.
  • DB-20120449-0 Profile Picture
    DB-20120449-0 6 on at
    Problem - Add an Incremental Button to a Gallery
    Hi,
    Thank you so much!!
    In terms of table ID.
    In my sharepoint table the 1st column is the stores, the 2nd column is the product, something like...store1-product1, store1-product2, store2-product2, so each store has a unique mix of products. I filter by store to get my mix of products. Do I need to change my table to make it work?
  • Suggested answer
    AndrianaO Profile Picture
    AndrianaO 161 on at
    Problem - Add an Incremental Button to a Gallery
    Hi! If I understood you correctly, you can try to do the following:
     
     1. Set OnVisible property of the Screen where the gallery is located to:
     
    ClearCollect(colNumber,Ungroup(ForAll('Test List',Table({ID: ThisRecord.ID, Number: 0})),Value))
     
    Instead of 'Test list' you should use your SharePoint list name.
     
    2. Set the Default property of your TextInput box ProductQty_2 to:
     
    LookUp(colNumber, ID = ThisItem.ID).Number
     
     
     
    3. Set the OnSelect property of your Button Button1_2 to:
     
    Patch(colNumber,LookUp(colNumber, ID = ThisItem.ID),{Number: ProductQty_2.Text+1})
     
    Let me know if this works! 
     
  • ronaldwalcott Profile Picture
    ronaldwalcott 1,345 on at
    Problem - Add an Incremental Button to a Gallery
    Show the code that you have. Are you using ThisRecord to identify the row?

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,867

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,174

Leaderboard