How to Format SharePoint Multilookup Fields in JSON
Question details
The user needs to correctly apply JSON formatting to a SharePoint multilookup field so that it functions properly regardless of whether one or multiple values are selected.

- Product
- SharePoint
- Device & OS
- not provided
- Scenario
- Applying declarative JSON column formatting to a multilookup field in a SharePoint list using a forEach iterator.
- Observed behavior
- The forEach iterator works when multiple selections are made but returns an error stating the field is not an array when only a single value is selected.
Verify the exact internal name of your SharePoint multilookup column, as you will need it to bypass the object-array limitation. You can find this internal name at the end of the URL when viewing the column's configuration in List Settings.
Reference the Internal Column Name in the forEach Expression
Directly reference the internal column name instead of using @currentField to ensure SharePoint handles both single and multiple selections properly within the iterator.
In SharePoint JSON formatting, a multilookup field is returned as an array when it contains multiple items, but as a single object when it contains only one item. Because the forEach loop strictly requires an array, using @currentField causes it to fail on single-item selections.
To resolve this, you must reference the field by its internal name inside the forEach expression, which forces the system to evaluate it appropriately.
Navigate to your SharePoint List Settings, click on the multilookup column, and check the URL. The internal name is the value located after 'Field='.
Open the column formatting JSON editor. Replace your existing iterator target with the internal name wrapped in brackets. For example: "forEach": "choiceIterator in [$Proposals]".
Ensure any nested references inside the loop use the new iterator variable. For example, use "[$choiceIterator.lookupValue]" to display the text.
Click Save to apply the JSON formatting. Refresh the SharePoint list and confirm that entries with both single and multiple selections are now formatted correctly.

Boost Your Productivity with WPS Office
While you troubleshoot advanced SharePoint configurations, ensure your team has reliable tools for daily document tasks. WPS Office offers a lightweight, highly compatible alternative to Microsoft Office, designed to handle your documents, spreadsheets, and presentations efficiently without subscription fees.
- 1. Download the installer: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install the application: Run the downloaded file and follow the straightforward on-screen instructions to complete the setup.
- 3. Start working seamlessly: Open WPS Office and immediately start opening, editing, and saving your existing Microsoft Office files.

Frequently Asked Questions
Why does my SharePoint JSON formatting fail when only one item is selected?
When a single item is selected in a multilookup field, SharePoint returns the value as an object rather than an array. The forEach loop requires an array to iterate, causing an error when it encounters the single-item object.
Can I use Array.isArray to check if the SharePoint column value is an array?
No, the Array.isArray operator is currently not supported within SharePoint declarative column-formatting JSON expressions.
How do I find the internal name of my SharePoint column?
Go to your SharePoint List Settings, scroll down to the Columns section, and click on your target column. Look at the web address in your browser; the text directly following 'Field=' at the end of the URL is the column's internal name.




