I have a list with a lookup field that references another list called Area
. The other list has a field called CssClass
that I've projected into the main list in order to use it for custom JSON formatting:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"box-sizing": "border-box",
"padding": "0 2px",
"overflow": "hidden",
"text-overflow": "ellipsis"
},
"attributes": {
"class": "[$Area_x003a_CssClass]"
},
"txtContent": "[$Area.lookupValue]"
}
My problem is that I don't want to display the Area:CssClass
field in my views of the main list, but the value from this projected field doesn't seem to be available to the formatting code unless it's visible in the same view.
Is there a way to use this projected field value without including it in the view?