Forum Discussion
JSON formatting lookup column with multiple values
NanaBar , look at this example:
Complex HTML elements formatting
You will need to define column formatting for each of your 3 multiple values columns. Basically you need to use the foreach attribute that can define, for example, a div for each value (using the children attribute).
Hope this help.
- watsonagMar 06, 2021Copper Contributor
I'm trying this same thing. I'm concerned the "forEach" function doesn't work on additional columns that are imported along with a Lookup column.
Interested to hear if anyone has a solution.
- watsonagMar 06, 2021Copper Contributor
Okay, so it looks like the additional columns that pull from the other list treat their contents as a single string with semicolons distributed throughout. It does not treat them as an array.
So how do you take a string with semicolons and turn it into an iterable array?That's not a feature yet. Go upvote this feature recommendation if you want it to be added.
https://sharepoint.uservoice.com/forums/329220-sharepoint-dev-platform/suggestions/35436979-json-formatting-add-parse-and-split-operand#comments