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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Configure a Button to ...
Power Apps
Answered

Configure a Button to update a record

(0) ShareShare
ReportReport
Posted on by 12

Hi,

 

I am new to Power Apps. I am trying to build an app that can serve as a simple Point-of-sales app for a pop-up bar to keep a tally of different drinks sold. Idea is to have several buttons in the main screen where the user can configure to point explicitly to a specific record (ie: the drink record the button is associated with). The button would display the name field of the record and at each click it would increase the "number of drinks sold" field (alternatively, it can keep a tally stored in a variable and then patch it to the record at the end). 

 

My question is how do I configure a button (or a label) to point to a specific record without hardcoding it? Because the user should be a able to change the record (drink) the button is associated with as their menu changes daily. 

 

Hope I have given enough info. Thanks in advance.

 

Cheers!

Pathum

Categories:
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    on at

    Hi @PathumBandara ,

     

    It'd be better to post some screenshots and sample data about your app to help us understand your scenario more quickly.

    In this case, you want the button to increase the number of drink sold field value of the drink record that is relate to the button, but not hardcoded, right?

    Not hardcoding mean you can change the button to associate with other drink records at anytime, so first I think there should be a a Gallery/drop-down or other controls with the same functionality to let the user choose a drink, then associate the selected drink to the button to increase the sold number.

    Gallery.Items:

     

    'Drink List'

     

    Button.OnSelect:

     

    Set(varSelectedDrink, LookUp('Drink List', DrinkName=Gallery.Selected.DrinkName));
    Patch('Drink List', varSelectedDrink, {'Number of Drink Sold': varSelectedDrink.'Number of Drink Sold' +1})

     

     

    Hope this helps.

    Sik

  • PathumBandara Profile Picture
    12 on at

    Hi @v-siky-msft 

     

    Thank you so much for your help. I have been banging my head to figure this out, when the solution was as simple as using a dropdown in the button. I'm so glad I asked for help. And your patch formula is exactly what I needed. 

     

    Cheers!

    Pathum

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard