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 / Color HTMLTEXT with IF...
Power Apps
Answered

Color HTMLTEXT with IF and Concat functions

(0) ShareShare
ReportReport
Posted on by 68

I've seen a number of similar posts about this but I still can't seem to figure it out based upon those examples...

I have an "HTML Text" field that concats some selected items from a combo box (connected to a Share Point data source)

The code I am using (which works) displays the selected items as text and looks at the value of another column to see if it is "rare"... It ends up looking like:

Shell A | Rare: Shell B | Shell C |

What I would like to do is to change the color of the selected item and the word "Rare: " to a bold red but I can't figure out if and where to put the HTML tags. Ideally I am looking to create this:

Shell A | Rare: Shell B | Shell C |

Concat(ShellsDropdown_1.SelectedItems, If('RARE'.Value = "YES", "Rare ") & " " & Title & " | ")

 
Is this possible? Any suggestions?

Categories:
I have the same question (0)
  • Verified answer
    Adrian_Celis Profile Picture
    1,652 Moderator on at

    Hi @CrimsonCrayon 

    Try:

    Concat(ShellsDropdown_1.SelectedItems, 
    If('RARE'.Value = "YES",
     "<span style='color:red'>Rare " & " " & Title & "</span> | ",
     Title & "| ")
    )
  • CrimsonCrayon Profile Picture
    68 on at

    Worked PERFECTLY. Thank you so much!!!

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard