web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 06m6Q1B1WPzoHMSa/LIwb0
Power Apps - Building Power Apps
Answered

Change color of gallery button, depending on selection on another page

Like (0) ShareShare
ReportReport
Posted on 17 Feb 2022 09:18:28 by 23

Hello, I have the following issue:

 

I want the buttons colorised, depending on a chosen selection.

 

LanesMan_0-1645089206803.png

 

If a button is selected, the user is able to update a Form.

If (in this case) "Beutel entspricht" = "Ja", then the color on the button on the first page should be green.

This should apply to the selected gallery item only.

 

LanesMan_1-1645089304949.png

 

Any ideas? Thank you very much in advance.

 

 

I have the same question (0)
  • LanesMan Profile Picture
    23 on 17 Feb 2022 at 11:55:48
    Re: Change color of gallery button, depending on selection on another page
    If(DataCardValue14.Selected.Value = "Ja",Red,Black)

    Without the first part of the string, this seems like exactly what I was looking for. Thank you very much for your help! It was a pleasure! 🙂 

  • Verified answer
    PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on 17 Feb 2022 at 11:39:45
    Re: Change color of gallery button, depending on selection on another page

    @LanesMan Just had a second look at your first screenshot and I found the issue.

     

    If I get it right, In the Left side you do have a form and on the right side you do have a gallery. If that is the case your formular will look like this:

     

    If(ThisItem.IsSelected && DataCardValue14.Selected.Value = "Ja",Red,Black)

     

    This should work now.

     

    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.

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on 17 Feb 2022 at 11:28:51
    Re: Change color of gallery button, depending on selection on another page

    @LanesMan The Field "Beutel entspricht" seems to be a Choice Field or Yes/No Field. So try this one.

     

     

    If(ThisItem.IsSelected && ThisItem.'Beutel entspricht'.Value = "Ja",Red,Black)

     

     

    My first formular had a Typo and I also thought we compare against a Single-Line of Text field.

     

    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.

  • LanesMan Profile Picture
    23 on 17 Feb 2022 at 11:21:20
    Re: Change color of gallery button, depending on selection on another page

    Thank you for the quick reply. Sadly there seems to be an issue with the equal sign. Power App states, that a record and a text cannot be compared. Also I am not sure, if ThisItem.'Beutel entspricht' is a viable name for the field. 

    LanesMan_0-1645096863416.png

     




  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on 17 Feb 2022 at 11:07:41
    Re: Change color of gallery button, depending on selection on another page

    @LanesMan Glad it helped you. If your issue is solved, please close the Topic.

     

    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.

     

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on 17 Feb 2022 at 09:24:34
    Re: Change color of gallery button, depending on selection on another page

    @LanesMan To achieve this, please use this formular on your buttons fill proeprty

    If(ThisItem.IsSelected && ThisItem.'Beutel entspricht" = "Ja",Red,Black)

     

    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete