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 colour of a B...
Power Apps
Unanswered

Changing colour of a Button on Form Load from value in a List

(0) ShareShare
ReportReport
Posted on by 4

Good evening all

 

hopefully a quick question for you all.

 

I have an initial main form with several buttons on it linked to another screen (data on that screen depends on the label of the button).  I have a connector setup which loads the relevant data from ListA on the screens the buttons are linked to.

 

What I would like to do is have the buttons on the main screen change colour (on form load) depending on the value of one of the columns in the ListA.  This would give the users an immediate visual identification of what is working and what isn't

 

For example

Box_name_columnServiceability_column
1Works
2Partial
3U/S

Works=Green, Partial=Yellow, U/S=Red

 

Many thanks for you help

Categories:
I have the same question (0)
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @gherkin12 Set the Fill property of the Button to,

     

    Switch(ListA.Serviceability_column,

        "Works", Green,

        "Partial", Yellow,

        "U/S", Red

    )

     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

  • gherkin12 Profile Picture
    4 on at

    thank you kindly for the suggestion, however i can't seem to get it to work.  Would it need to call the ID of the list entry in order to associate it with that particular button.  When I click on the button to load up the screen associated with it, I do reference the ID of the entry in order to pull the details.

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @gherkin12 Could you share some screen shots & formulas?

  • gherkin12 Profile Picture
    4 on at

    So i have your formula in the Fill of the button.  in OnSelect I have:

    Navigate(scr2, fade); Set(var1, "Box 1"); Set(var2, "1");

    There are 2 variables for a reason, one gives the text to a label, and the other is linked in the whats called on scr2.

     

    Unfortunately i can't supply any screenshots i'm afraid.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 408

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 319

Last 30 days Overall leaderboard