Skip to content

List Formatting: The values of the properties (picture, department, jobTitle) for users set in the multiple selectable person column are not retrieved. #10063

Open
@tecchan1107

Description

@tecchan1107

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

Declarative list formatting

Developer environment

Windows

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

No response

Describe the bug / error

For multiple selectable person columns where the "Show field" is set to Name (with presence), the values of the properties (picture, department, jobTitle) for users are not retrieved.

image

In contrast, for single-select person columns, it is possible to retrieve the values of these properties.

image

However, for multiple selectable person columns, changing the "Show field" setting from the default Name (with presence) to Name (with pictures and details) enables the retrieval of these property values.

image


Related document: https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/formatting-syntax-reference#currentfield

image


*This issue was first discovered by @watana2

Steps to reproduce

  1. Create a multiple selectable person column with the internal name of the column MultiSelectPerson
  2. Set any user to the column created in 1
  3. Apply the following JSON to any column
Column Formatting
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "children": [
    {
      "elmType": "div",
      "style": {
        "display": "flex",
        "flex-direction": "column",
        "padding": "5px"
      },
      "children": [
        {
          "elmType": "div",
          "forEach": "_person in [$MultiSelectPerson]",
          "style": {
            "border": "1px solid",
            "margin": "5px"
          },
          "children": [
            {
              "elmType": "div",
              "children": [
                {
                  "elmType": "span",
                  "txtContent": "id: "
                },
                {
                  "elmType": "span",
                  "txtContent": "[$_person.id]"
                }
              ]
            },
            {
              "elmType": "div",
              "children": [
                {
                  "elmType": "span",
                  "txtContent": "title: "
                },
                {
                  "elmType": "span",
                  "txtContent": "[$_person.title]"
                }
              ]
            },
            {
              "elmType": "div",
              "children": [
                {
                  "elmType": "span",
                  "txtContent": "email: "
                },
                {
                  "elmType": "span",
                  "txtContent": "[$_person.email]"
                }
              ]
            },
            {
              "elmType": "div",
              "children": [
                {
                  "elmType": "span",
                  "txtContent": "sip: "
                },
                {
                  "elmType": "span",
                  "txtContent": "[$_person.sip]"
                }
              ]
            },
            {
              "elmType": "div",
              "children": [
                {
                  "elmType": "span",
                  "txtContent": "picture: "
                },
                {
                  "elmType": "span",
                  "txtContent": "[$_person.picture]"
                }
              ]
            },
            {
              "elmType": "div",
              "children": [
                {
                  "elmType": "span",
                  "txtContent": "department: "
                },
                {
                  "elmType": "span",
                  "txtContent": "[$_person.department]"
                }
              ]
            },
            {
              "elmType": "div",
              "children": [
                {
                  "elmType": "span",
                  "txtContent": "jobTitle: "
                },
                {
                  "elmType": "span",
                  "txtContent": "[$_person.jobTitle]"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Expected behavior

The values of all properties can be retrieved even if "Show field" is set to Name (with presence).

Metadata

Metadata

Assignees

Labels

area:list-formattingCategory: View, row & column formatting with JSONsharepoint-developer-supportsharepoint-developer-supporttype:bug-confirmedConfirmed bug, not working as designed / expected.type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions