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 / Add a template fill ba...
Power Apps
Answered

Add a template fill based on a choice column.

(0) ShareShare
ReportReport
Posted on by 5

I am trying to make the template fill of my gallery :"gal_Calendar_Events" change color based on a SharePoint column called "Groupe". This column has a choice of two items. 

 

How would I be able to do this?

 

Thanks! 

Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @ZDwastaken 

     

    you can try this:

    If(ThisItem.Groupe.Value = "Choice1", RGBA(255, 0, 0, 1), RGBA(0, 0, 255, 1))
    

     

    you would need to change it to your needs. Replace "Choice1" with the Value you have in the SP Choice column. If you know the excat RGBA code you would also need to change.Otherwise you could also use Color. Red for example.

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • ZDwastaken Profile Picture
    5 on at

    It gives me an error on the "=" : 

    Incompatible types for comparison: These types can't be compared: Table, Text

    4.png
  • Verified answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    you can also use the switch function:

    Switch(ThisItem.Groupe.Value,
     "Choice1", RGBA(255, 0, 0, 1),
     "Choice2", RGBA(0, 255, 0, 1),
     RGBA(0, 0, 255, 1) // Default color if none of the choices match
    )
    

     

    again you would need to rename to your needs.

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

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
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard