SharePoint List Header- Multiple Persons column not returning first name & last name

Harry N Nomikos 1,271 Reputation points
2023-09-22T14:28:21.64+00:00

Hi Team

I've recently added a new column field to my SharePoint list header to display names of Change Managers. The field is a persons field where multiple people can be added. The JSON coding has returned the below of [object Object],[object],[Object] and my expected result was to show their first name followed by the last name. Can you please review and amend my JSON coding below.

User's image

                    "elmType": "div",
                    "txtContent": "=if ([$ChangeContact] == '', 'Change Manager', 'Change Manager: ' + [$ChangeContact])",
                    "attributes": {
                        "class": "ms-fontColor-white ms-fontWeight-bold ms-fontSize-12"

Regards,
Harry

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,616 questions
{count} votes

Accepted answer
  1. Emily Du-MSFT 45,586 Reputation points Microsoft Vendor
    2023-09-25T02:22:21.54+00:00

    Please use following JSON codes as example:

    "elmType": "div",
    "txtContent": "=if ([$ChangeContact] == '', 'Change Manager', 'Change Manager: ' + join([$ChangeContact.title], ', ')"
    "attributes": {
        "class": "ms-fontColor-white ms-fontWeight-bold ms-fontSize-12"
    

    Result:

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.