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 / Disable buttons when a...
Power Apps
Answered

Disable buttons when another button is clicked.

(0) ShareShare
ReportReport
Posted on by 195

I would like to disable the 'Reject', 'Cancel' and 'Request Change' buttons when the 'Approve' button is clicked.  I thougth the below formula would work, but it didn't.

isogunro1_0-1679340256567.png

 

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    give all the non approve buttons this displaymode

    Switch(chosenBtn=btnApprove,
     true, DisplayMode.Disabled, DisplayMode.Edit)

     

    and add this to the approve buttons onselect

    UpdateContext({chosenBtn:Self})
  • isogunro1 Profile Picture
    195 on at

    @TheRobRush ,

     

    What does this do?  

    UpdateContext({chosenBtn:Self})

    I'm confused by the 'Self' 

  • isogunro1 Profile Picture
    195 on at

    @TheRobRush ,

     

    Also, how do I enable those buttons again once I navigate away from the page?  When I go to the same page with a different item, those buttons are still disabled.

  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at
    UpdateContext({chosenBtn:Self})

    Tells your aapp.via context that the submit button has been selected.

     

    To reset, in the onvisible.of that screen place 

    UpdateContext({chosenBtn:Blank()})
  • isogunro1 Profile Picture
    195 on at

    @TheRobRush , thanks for responding but I get the following error

    isogunro1_0-1679412761535.png

     

  • TheRobRush Profile Picture
    11,128 Moderator on at

    hover arond the squiggly lines back and forth until it shows you the actual error, or hover over the red x on the screen. righ tnow you are not showing the error, jsut the definition of updatecontext

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Oh Nevermind I see recreated iton my side, give me one minute

  • TheRobRush Profile Picture
    11,128 Moderator on at

    So change it from blank to ANY name of one of those other buttons doesn't matter which just choose one

  • TheRobRush Profile Picture
    11,128 Moderator on at

    like so

    UpdateContext({chosenBtn:btnReject})
  • isogunro1 Profile Picture
    195 on at

    Thank you @TheRobRush 

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!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 84

#2
WarrenBelz Profile Picture

WarrenBelz 79 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 40 Super User 2026 Season 1

Last 30 days Overall leaderboard