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 / Activate a button afte...
Power Apps
Answered

Activate a button after selecting a checkbox

(0) ShareShare
ReportReport
Posted on by 53

Hi everyone I am trying to activate a Button called "Button7" when a checkbox "ChkboxPDPPol" is marked. Whilst I have found several options and examples, I am not able to get it right. 

 

949184_soy_0-1689277757410.png

 

For instance when I try with the property "Onselect" while selecting the Button, I got an error that says: (i) "unexpected characters. the formula contains 'parenclose' where 'error' is expected" and (ii) "unexpected characters. characters are used in the formula in an unexpected way", as shown below:

 

949184_soy_4-1689278673929.png

 

And similarly when I use the "DisplayMode" property as shown below:

 

949184_soy_5-1689278694026.png

 

Any help will be appreciated

 

Cheers

 

Categories:
  • EddieE Profile Picture
    4,650 Moderator on at

    @949184_soy 

    On the OnCheck property of the checkbox, put this code

     

    Select(Button7)
  • 949184_soy Profile Picture
    53 on at

    Thank you, probably I did not explain myself accurately. I need is to Disable/Enable "Button7" depending on  "ChkboxPDPPol". If ChkboxPDPPol is checked Enable "Button7" if not Disable "Button7". 

     

    Cheers

  • EddieE Profile Picture
    4,650 Moderator on at

    @949184_soy 

    Ah ok.

     

    Then do this

    Checkbox OnCheck

    UpdateContext({ vButtonState: true })

    Checkbox UnCheck

    UpdateContext({ vButtonState: false })

     

    Button7 DisplayMode

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

     

     

  • 949184_soy Profile Picture
    53 on at

    Hi, thank you I managed to add the formulas to the checkbox, but the Button is still showing an error: 

     

    949184_soy_0-1689281073735.png

    I am pretty sure I am missing something, as I am quite new with power apss my apologies 

     

    Cheers

  • Verified answer
    EddieE Profile Picture
    4,650 Moderator on at

    @949184_soy 

    Sorry, where is the error? I cannot see it.

     

    If it is to do with your original If() statement on your OnSelect, then just remove the If() and leave the actions code on your button only. The Checkbox state will ensure that the button cannot be clicked - and therefore run - so an If() isn't needed

  • 949184_soy Profile Picture
    53 on at

    I still have the problem, but I will mark this as a solution because I am pretty sure there is something missing from my side. 

  • EddieE Profile Picture
    4,650 Moderator on at

    @949184_soy 
    No worries, let me know if you need any further help.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard