SOLVED

JSON Formatting Column that uses a Terms under a Term Set

%3CLINGO-SUB%20id%3D%22lingo-sub-504276%22%20slang%3D%22en-US%22%3EJSON%20Formatting%20Column%20that%20uses%20a%20Terms%20under%20a%20Term%20Set%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-504276%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20column%20in%20a%20list%20that%20is%20populated%20by%20Terms%20from%20a%20Term%20Set.%26nbsp%3B%20The%20Terms%20are%20Off-Campus%2C%20Full%20Time%2C%20Short%20Term%2C%20One%20Semester%2C%20and%20Chinese.%26nbsp%3B%20I%20have%20the%20JSON%20code%20in%20the%20column%20formatting%20for%20the%20column%20called%20Program.%26nbsp%3B%20Each%20of%20he%20individual%20values%20are%20blank%20and%20are%20all%20colored%20red%2C%20which%20it%20should%20be%20since%20the%20value%20is%20not%20being%20found.%26nbsp%3B%20What%20am%20I%20missing%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EJohn%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%7B%3CBR%20%2F%3E%22%24schema%22%3A%20%22%3CA%20href%3D%22https%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fcolumn-formatting.schema.json%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fcolumn-formatting.schema.json%3C%2FA%3E%22%2C%3CBR%20%2F%3E%22elmType%22%3A%20%22div%22%2C%3CBR%20%2F%3E%22txtContent%22%3A%20%22%40currentField%22%2C%3CBR%20%2F%3E%22style%22%3A%20%7B%3CBR%20%2F%3E%22color%22%3A%20%22%23fff%22%2C%3CBR%20%2F%3E%22padding-left%22%3A%20%2214px%22%2C%3CBR%20%2F%3E%22background-color%22%3A%20%7B%3CBR%20%2F%3E%22operator%22%3A%20%22%3F%22%2C%3CBR%20%2F%3E%22operands%22%3A%20%5B%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22operator%22%3A%20%22%3D%3D%22%2C%3CBR%20%2F%3E%22operands%22%3A%20%5B%3CBR%20%2F%3E%22%40currentField%22%2C%3CBR%20%2F%3E%22Off-Campus%22%3CBR%20%2F%3E%5D%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E%22%2342F47A%22%2C%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22operator%22%3A%20%22%3F%22%2C%3CBR%20%2F%3E%22operands%22%3A%20%5B%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22operator%22%3A%20%22%3D%3D%22%2C%3CBR%20%2F%3E%22operands%22%3A%20%5B%3CBR%20%2F%3E%22%40currentField%22%2C%3CBR%20%2F%3E%22Full%20Time%22%3CBR%20%2F%3E%5D%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E%22%235FB7FA%22%2C%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22operator%22%3A%20%22%3F%22%2C%3CBR%20%2F%3E%22operands%22%3A%20%5B%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22operator%22%3A%20%22%3D%3D%22%2C%3CBR%20%2F%3E%22operands%22%3A%20%5B%3CBR%20%2F%3E%22%40currentField%22%2C%3CBR%20%2F%3E%22Short%20Term%22%3CBR%20%2F%3E%5D%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E%22%23F49842%22%2C%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22operator%22%3A%20%22%3F%22%2C%3CBR%20%2F%3E%22operands%22%3A%20%5B%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22operator%22%3A%20%22%3D%3D%22%2C%3CBR%20%2F%3E%22operands%22%3A%20%5B%3CBR%20%2F%3E%22%40currentField%22%2C%3CBR%20%2F%3E%22One%20Semester%22%3CBR%20%2F%3E%5D%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E%22%23FACF5F%22%2C%3CBR%20%2F%3E%22%23FA5FF0%22%3CBR%20%2F%3E%5D%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%5D%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%5D%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%5D%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-504276%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-506274%22%20slang%3D%22en-US%22%3ERe%3A%20JSON%20Formatting%20Column%20that%20uses%20a%20Terms%20under%20a%20Term%20Set%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-506274%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F57474%22%20target%3D%22_blank%22%3E%40John%20Heck%3C%2FA%3E%26nbsp%3BJSON%20Column%20formatting%20is%20not%20supported%20with%20Managed%20Metadata%20Fields.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-525088%22%20slang%3D%22en-US%22%3ERe%3A%20JSON%20Formatting%20Column%20that%20uses%20a%20Terms%20under%20a%20Term%20Set%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-525088%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F39836%22%20target%3D%22_blank%22%3E%40Beau%20Cameron%3C%2FA%3E%2C%20thanks%20for%20the%20update%20(I%20had%20a%20feeling%20this%20might%20be%20the%20case).%26nbsp%3B%20I%20will%20change%20the%20column%20into%20a%20Choice%20column.%26nbsp%3B%20Hopefully%2C%20Managed%20Metadata%20will%20be%20supported%20by%20JSON%20Column%20formatting%20in%20the%20near%20future.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

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
Highlighted
Best Response confirmed by John Heck (Occasional Contributor)
Solution

@John Heck JSON Column formatting is not supported with Managed Metadata Fields.

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.