Forum Discussion
SharePoint Form JSON Customize layout header - Managed metadata not working
I'm trying to add a managed metadata field titled Status to the header portion of a SharePoint form.
Here is the JSON I am using:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/form-formatting.schema.json",
"elmType": "div",
"style": {
"background-color": "#e8f5ee",
"border": "1px solid rgba(0,0,0,0.1)",
"border-radius": "8px",
"padding": "12px 16px",
"margin-bottom": "12px"
},
"children": [
{
"elmType": "div",
"style": {
"display": "grid",
"grid-template-columns": "140px 1fr",
"row-gap": "4px",
"column-gap": "12px",
"align-items": "center"
},
"children": [
{ "elmType": "div", "style": { "margin": "0", "line-height": "1.2", "font-weight": "600", "color": "#616161", "font-size": "32px" }, "txtContent": "=[$Title]" },
{ "elmType": "div", "style": { "margin": "0", "line-height": "1.35", "font-size": "18px" }, "txtContent": "='ID: ' + [$ID]"},
{ "elmType": "div", "style": { "margin": "0", "line-height": "1.35", "font-size": "18px" }, "txtContent": "='Status: ' + [$Status]"},
{ "elmType": "div", "style": { "margin": "0", "line-height": "1.35", "font-size": "18px" }, "txtContent": "='label: ' + [$Status.label]"},
{ "elmType": "div", "style": { "margin": "0", "line-height": "1.35", "font-size": "18px" }, "txtContent": "='Label: ' + [$Status.Label]"},
{ "elmType": "div", "style": { "margin": "0", "line-height": "1.35", "font-size": "18px" }, "txtContent": "='GUID: ' + [$Status.termGuid]"},
{ "elmType": "div", "style": { "margin": "0", "line-height": "1.35", "font-size": "18px" }, "txtContent": "='Path: ' + [$Status.path]"}
]
}
]
}
Here is the result:
Only the Title and ID fields appear.
All other attempts render blank.
The Status field does have a Value which I do see on the Body of the form
What is corret JSON syntax to display Managed metadata fields in the Header?