Forum Discussion

grant_jenkins's avatar
grant_jenkins
Iron Contributor
Oct 01, 2023

Person Column Formatting not working as expected

I have a SharePoint List with a Person column and have applied some Column Formatting. However, there seems to be a bug when trying to retrieve properties such as department, job title, etc.

 

If I add a List webpart to my page the list shows with the correct job title and department. However, as soon as I click on See all (or view directly in the list) it sometimes brings up incorrect values (title instead of job title for example), and most of the time doesn't show the job title or department at all (for most users).

 

Below is an example of what it looks like in my List webpart and below that what I see when viewing directly within the list.

 

Viewing the List webpart on my page shows correct values.

 

Viewing the list directly shows incorrect or missing values. Note my name appears instead of job title. And the second person has no values displayed for job title or department.

 

Snippet of the Column Formatting I'm using is below:

 

{
    "elmType": "div",
    "children": [
        {
            "elmType": "div",
            "txtContent": "@currentField.title",
            "style": {
                "font-size": "1.05em",
                "font-weight": "bold"
            }
        },
        {
            "elmType": "div",
            "txtContent": "@currentField.jobTitle",
            "style": {
                "color": "gray"
            }
        },
        {
            "elmType": "div",
            "txtContent": "@currentField.department",
            "style": {
                "color": "gray"
            }
        }
    ]
}

 

 

See link to the Column Formatting documentation and what properties are available on the Person field. https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/formatting-syntax-reference#special-string-valuesFormatting syntax reference | Microsoft Learn

 

Any help in understanding what the underlying issue is; whether it's a known issue; any proposed fix by Microsoft, etc.

1 Reply

  • Anonymous's avatar
    Anonymous

    You may have already found your answer, but in case you or others are still looking, here's the information.  Update the "Show field" value to "Name (with picture and details)" for the Person column in the list settings.

Resources