Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 9 tasks
tecchan1107 opened this issue Dec 24, 2024 · 0 comments
Labels
type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@tecchan1107
Copy link
Contributor

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).

@tecchan1107 tecchan1107 added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Dec 24, 2024
@tecchan1107 tecchan1107 changed the title List Formtting: The values of the properties (picture, department, jobTitle) for users set in the multiple selectable person column are not retrieved. List Formatting: The values of the properties (picture, department, jobTitle) for users set in the multiple selectable person column are not retrieved. Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

1 participant