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 / 3 buttons with all giv...
Power Apps
Unanswered

3 buttons with all giving a color to another field.

(0) ShareShare
ReportReport
Posted on by 15

I am currently working on an inspection app.
in the app you get 3 options when you get to a question.
- OK
- N.V.T. ( not aplicable)
- NOK

 

When the "green" OK button is pressed the rectangle on the overview page must be colored green.
When the "grey" N.V.T. button is pressed the rectangle on the overview page must be colored grey.
When the "red" NOK button is pressed the rectangle on the overview page must be colored red.

 

How can I make this work????

 

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

    @Michaelvkempen First set a variable in each one of the buttons,

    In the OnSelect of the OK button,

    UpdateContext({rectangleColour: Color.Green})

     

    In the OnSelect of the N.V.T. button,

    UpdateContext({rectangleColour: Color.Gray})

     

    In the OnSelect of the NOK button,

    UpdateContext({rectangleColour: Color.Red})

     

    Finally, set the Fill property of the rectangle to,

    rectangleColour

     

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

  • Michaelvakempen Profile Picture
    2 on at

    Thanks for your reply ( for one or another reason i can't get back to the other account)
    i forgot to mention a thing i see.
    the rectangle is on another page...
    it does work on the same page so it works now i need to allocate the ractangle on the other page.

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

    @Michaelvakempen @Michaelvkempen

    • Use a global variable, Set(rectangleColour, Color.Green)

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

  • Michaelvkempen Profile Picture
    15 on at

    thanks for your fast reply.
    in my app there are more than 1 question so i transformed the "rectanglecolour" to "rectanglecolour1" 

    also there is another command in there which makes it move to the next question page.
    now the problem with the new command you just gave the problem is that the button does nothing and gives an red cross.
    I changed the Set(rectangleColour, Color.Green) to Set(rectangleColour; Color.Green) than the red cross disappears but the rectangle still wont's change color on the other screen.

     

    one way is to place a rectangle on the screen where the button is which colors to the first codes you gave me.
    and then place another rectangle on the overview page which than takes over the color of the rectangle on the button page but that is a little bit cumbersome.

     

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

    @Michaelvakempen @Michaelvkempen could you share some screen shots? 

  • Michaelvkempen Profile Picture
    15 on at

    Michaelvkempen_0-1647514214861.png

    this is on the 1st questions page with the OK button selected.

    Michaelvkempen_1-1647514260660.png

    This is on the overview page with the first rectangle selected with the fill in sight

     

  • Michaelvkempen Profile Picture
    15 on at

    @CNT I am 2 hours into trying and testing but can't get it to work yet.
    did you find some fixes yet?

  • Michaelvkempen Profile Picture
    15 on at
    @CNT have you found a fix for the colouring? the way i made it work at the moment is to place a rectangle on the page where the buttons are. on the overview page i placed another rectangle wich has the name of the rectangle on the button page. this way it takes the colour over. a single working rectangle isn't working yet

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 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard