Forum Discussion

John Heck's avatar
John Heck
Copper Contributor
Apr 30, 2019
Solved

JSON Formatting Column that uses a Terms under a Term Set

Hello,

 

I have a column in a list that is populated by Terms from a Term Set.  The Terms are Off-Campus, Full Time, Short Term, One Semester, and Chinese.  I have the JSON code in the column formatting for the column called Program.  Each of he individual values are blank and are all colored red, which it should be since the value is not being found.  What am I missing?

 

Thanks,

John

 

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"color": "#fff",
"padding-left": "14px",
"background-color": {
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"@currentField",
"Off-Campus"
]
},
"#42F47A",
{
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"@currentField",
"Full Time"
]
},
"#5FB7FA",
{
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"@currentField",
"Short Term"
]
},
"#F49842",
{
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"@currentField",
"One Semester"
]
},
"#FACF5F",
"#FA5FF0"
]
}
]
}
]
}
]
}
}
}

2 Replies

    • John Heck's avatar
      John Heck
      Copper Contributor

      Hello Beau Cameron, thanks for the update (I had a feeling this might be the case).  I will change the column into a Choice column.  Hopefully, Managed Metadata will be supported by JSON Column formatting in the near future.