Lookup in Lists Board view

Copper Contributor

I have added a lookup column to a list. It displays correctly in the list view:

jomy12_0-1702655960802.png

However, when switching to the Board View, it displays as [Object object]. How can I display this correctly as text?

jomy12_1-1702656023112.png

 

3 Replies

@jomy12 

I just tried it on our SharePoint site and lookup columns on the board views works fine: 

ganeshsanap_0-1702903972666.png

Did you apply any advanced JSON formatting for your board view? If yes, you will have to adjust the JSON formatting to show the lookup column value correctly on your board view.


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@ganeshsanap I tried resetting the card's formatting, but it's still showing [Object object]. Could you share the JSON version of your formatting so I could maybe recreate it?

@jomy12 

To resolve the issue of a lookup column displaying as "[Object object]" in the Board View, you can utilize a custom formatter. The default Board View doesn't show actual lookup values but rather as hyperlinks. The "[Object object]" message indicates this hyperlink display. To rectify this and display the actual lookup values, create a custom formatter using the following JavaScript code:

 

function formatLookupValue(value) {
// If the value is not null or undefined, it is the actual value of the lookup column.
// Otherwise, it is a hyperlink to the corresponding item in the parent list.
if (value) {
return value;
} else {
return "[Object object]";
}
}

 

Add this custom formatter to the list view. To do it - open the list view in Edit mode. Click on the Edit Columns button. Select the lookup column you want to format. In the Formatter field, enter the name of your custom formatter function (e.g., formatLookupValue). Click on the Save button. Now, the lookup column should display correctly in the Board View, showing the actual values instead of "[Object object]."