2

I'm formatting a list for an org. chart-ish view and formatting the list JSON.

I use the person field to extract some information directly from the "User". E.g. the users email address to display the email of that contact (with $person.email) or the name (with $person.title).

Is there a list of information which can be extracted / used from this person object?

I didn't find on the internet.

Tested some terms, but nothing but .id worked.

I'm thinking of work phone or something.

Any ideas?

enter image description here

"children": [
          {
            "elmType": "a",
            "style": {
              "cursor": "pointer"
            },
            "attributes": {
              "class": "ms-fontColor-red",
              "iconName": "Mail",
              "href": "='mailto:' + [$User.email] + '?body=Dear ' + [$User.title] + ',\r\n'",
              "title": "='E-Mail an ' + [$User.title]"
            }
          }
        ]

1 Answer 1

3

You can get following properties from the people field in JSON formatting (with example values):

{
   "id": "122",
   "title": "Kalya Tucker",
   "email": "[email protected]",
   "sip": "[email protected]",
   "picture": "https://contoso.sharepoint.com/kaylat_contoso_com_MThumb.jpg?t=63576928822",
   "department":"Human Resources",
   "jobTitle":"HR Manager"
}

Official documentation:

Column Formatting in SharePoint - Special string values - Check People fields section

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.