logo
search
SharePoint Document Issues

How to Format SharePoint Multilookup Fields in JSON

Guest WriterGuest Writer Sep 29, 2026 868 views

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.

How to Format SharePoint Multilookup Fields with One or Multiple Values
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.
Before you start

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.

Solution 1Recommended

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.

1
Find the column internal name

Navigate to your SharePoint List Settings, click on the multilookup column, and check the URL. The internal name is the value located after 'Field='.

2
Modify the forEach iterator

Open the column formatting JSON editor. Replace your existing iterator target with the internal name wrapped in brackets. For example: "forEach": "choiceIterator in [$Proposals]".

3
Update value references

Ensure any nested references inside the loop use the new iterator variable. For example, use "[$choiceIterator.lookupValue]" to display the text.

4
Save and verify

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.

Reference the Internal Column Name in the forEach Expression
Array.isArray Limitation: Do not attempt to use the Array.isArray operator to check the data type, as it is not supported in SharePoint declarative column-formatting expressions.
Free Microsoft Office alternative

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. 1. Download the installer: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Install the application: Run the downloaded file and follow the straightforward on-screen instructions to complete the setup.
  3. 3. Start working seamlessly: Open WPS Office and immediately start opening, editing, and saving your existing Microsoft Office files.
Fully compatible with Microsoft Office document formats (.docx, .xlsx, .pptx).Seamlessly edit and format complex data reports and business proposals.Lightweight application that uses minimal system resources.Familiar, tabbed user interface ensures a zero learning curve for effortless migration.
microsoft office alternative - wps office

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.