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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Add a template fill ba...
Power Apps
Unanswered

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,605 Super User 2025 Season 2 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

  • Verified answer
    mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard