I have problems formatting the column of a lookup field with json. Precisely, it is an additional field, displayed from the parent list that I want to format. The lookup field is of type multiple, so I want to loop over all items with forEach.
For reference, this code works on the primary lookup column as a MVP.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"forEach": "choiceIterator in @currentField",
"elmType": "div",
"txtContent": "[$choiceIterator.lookupValue]"
}
]
}
When I use this code on the "additional" column, the column entries are empty. The sharepoint default for this additional column is a semicolon separeted list of all items which I do not like.