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 / How to enable/disable ...
Power Apps
Answered

How to enable/disable a button based on condition

(0) ShareShare
ReportReport
Posted on by 100

Good afternoon ,

I have 1 button and 1 icon.

when the first time if the  button is pressed , the button should be disabled .

the button should be enabled again when the icon is pressed.

please help me

Categories:
I have the same question (0)
  • Verified answer
    cha_cha Profile Picture
    4,932 Moderator on at

    Hello @preethi1_suresh 

     

    On the loading of the screen set a context variable to True.

    cha_cha_0-1669025667579.png

     

    On the Button, set two properties:

    For OnSelect: UpdateContext({varEnabled: false});

    cha_cha_1-1669025710997.png

     

    For DisplayMode: If(varEnabled,DisplayMode.Edit,Disabled)

    cha_cha_2-1669025743623.png

     

    Then on the Icon:

    cha_cha_5-1669025810089.png

     

     

    Output should be like this:

    Recording #45.gif

     

     

  • Verified answer
    preethi1_suresh Profile Picture
    100 on at

    Thank you so much. It satisfied my need. thank a lot.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard