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 / Enable button based on...
Power Apps
Answered

Enable button based on another button

(0) ShareShare
ReportReport
Posted on by 520

I want to keep a button disabled, lets call it Cancel.

Only after clickin a button Save, button cancel should be enabled.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @Robert94 ,

    Set a Variable in your Saved code

    UpdateContext({varSaved:true})

    also put at Screen OnVisible

    UpdateContext({varSaved:false})

    Then the DisplayMode of your Cancel button would be

    If(
     varSaved,
     DisplayMode.Edit,
     DisplayMode.Disabled
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • Robert94 Profile Picture
    520 on at

    Not working.

  • Tushya_Trivedi Profile Picture
    52 on at

    Tushya_Trivedi_0-1643018302147.png

    Tushya_Trivedi_1-1643018479131.png

    Tushya_Trivedi_2-1643018497938.png

     

     

     

    In the App's Onstart property make a global variable as false
    Save button's onselect property makes it true
    And if the variable is true cancel button is enabled.

     

  • Verified answer
    Robert94 Profile Picture
    520 on at

    This worked for me.

    If(!ShowItemsButton, Disabled, Edit) - set in Cancel button

    UpdateContext({ShowItemsButton: false}) - OnVisible screen

    UpdateContext({ShowItemsButton:true}) -set in save button

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @Robert94,

    Glad that you have resolved this.

    Could you please mark your reply as an answer to help more users who may have the similar issue with you.

    Thanks for your cooperation.

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    @Robert94 ,

    I assume that you have simply changed a Variable name from what I posted ? Is this now resolved?

  • Robert94 Profile Picture
    520 on at

    Please read again carefully what I did and see the differences. Thank you

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    @Robert94 ,

    I see - you have reversed the both the Variable and the true/false order (getting the same result) . . .

    I am glad I could guide you to your solution . . . 

  • Robert94 Profile Picture
    520 on at

     Thank you. I am new to this, so sorry if they are the same, i probably introduced your formulas wrong.

  • Community Power Platform Member Profile Picture
    on at

    I have a query, i have 4 buttons of add and i have four different tabs(varTabSelected), when i select one tab and add some fields to it rest other add buttons must be invisible and when i go to anyother tab then the corresponding add button with that only work for that tab. 

    NOTE: I have already used Patch function to connect the particular tab with the button just i want to hide other buttons when i am on a particular tab.Do help me out 

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard