Conditional Formatting Column Text to color code based specific words | Community
Skip to main content
Level 3
September 12, 2024
Question

Conditional Formatting Column Text to color code based specific words

  • September 12, 2024
  • 1 reply
  • 455 views

I was looking at the conditional formatting for text mode and how to add colors or icons to it. I have a column that already merges several columns to give me the latest update, the person who said it, and the date. 
displayname=Latest Update
namekey=latest update
textmode=true
valueexpression=IF(LEN({lastNote}.{noteText})>250, CONCAT(SUBSTR({lastNote}.{noteText},0,249),"...(open for more) -- ", {lastNote}.{owner}.{name}," on ", {lastNote}.{entryDate}), IF(LEN({lastNote}.{noteText})>0, CONCAT({lastNote}.{noteText}," -- ", {lastNote}.{owner}.{name}," on ", {lastNote}.{entryDate})))
valueformat=HTML

But for this specific report, I would like to add where if in the text is contains Passed to make the text green and if it contains Fail to make it red or a green flag icon or red flag icon. I haven't seen anything on finding a specific word. Can anyone help me know how to write it?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Rafal_Bainie
Community Advisor
Community Advisor
September 13, 2024

hi there,

displayname=Latest Update namekey=latest update styledef.case.0.comparison.icon=false styledef.case.0.comparison.leftmethod=lastNote:noteText styledef.case.0.comparison.lefttext=lastNote:noteText styledef.case.0.comparison.operator=cicontains styledef.case.0.comparison.operatortype=string styledef.case.0.comparison.righttext=Passed styledef.case.0.comparison.trueproperty.0.name=textcolor styledef.case.0.comparison.trueproperty.0.value=03a219 styledef.case.0.comparison.truetext= styledef.case.1.comparison.icon=false styledef.case.1.comparison.leftmethod=lastNote:noteText styledef.case.1.comparison.lefttext=lastNote:noteText styledef.case.1.comparison.operator=cicontains styledef.case.1.comparison.operatortype=string styledef.case.1.comparison.righttext=Fail styledef.case.1.comparison.trueproperty.0.name=textcolor styledef.case.1.comparison.trueproperty.0.value=d30519 styledef.case.1.comparison.truetext= textmode=true valueexpression=IF(LEN({lastNote}.{noteText})>250, CONCAT(SUBSTR({lastNote}.{noteText},0,249),"...(open for more) -- ", {lastNote}.{owner}.{name}," on ", {lastNote}.{entryDate}), IF(LEN({lastNote}.{noteText})>0, CONCAT({lastNote}.{noteText}," -- ", {lastNote}.{owner}.{name}," on ", {lastNote}.{entryDate}))) valueformat=HTML

I'm still unsure if this is full answer, because strictly speaking this isn't merged column, just a single one including values from several fields. Merged columns would usually have column number specified in front, e.g.: