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 / Changing a button's ap...
Power Apps
Answered

Changing a button's appearance based on a condition

(0) ShareShare
ReportReport
Posted on by 51

Is it possible to change multiple buttons based on a condition? I currently have a text box containing the duration which will be the basis of the button color/text change and has to be successfully patched. I have a column of 8 buttons with consecutive button names (e.g. Button1, Button2, ... Button8)

Was initially thinking about a for loop but im not sure if that's possible on Power Apps

Context: If duration is 1 hour, only 1 button will change. If duration is 5 hours, 5 buttons will change

 

Thank you!

Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,968 Super User 2026 Season 2 on at

    @kdc02 

     

    The answer is yes, but you would need to put the formula in the buttons Text/Color/Border/bla bla bla to have the impact you want, but yes you can do it no problem.

     

    Imagine you were for instance wanting to change the Color of the button.

    In the Color Property
    
    Switch(Value(TextInput1.Text),
     1, Color.Red,
     2, Color.Blue,
     3. Color.Purple,
    // then here you just add a default directly like this, dont have a switch value for it, just add it after the Value of the previous Value/Color
     Color.Black
    
    )


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard