1

I have been referring to:

Use column formatting to customize SharePoint

And also reading multiple blog posts around the subject.

I have not yet found a definitive list of object properties available through column formatting.

I looked around the SharePoint REST API v1 docs, but there doesn't seem to be any complete reference there (and I'm not sure if what is available via the API is also available through column formatting).

Does a resource like this exist?

I am specifically trying to find what properties are accessible in a Person object.

I want to show the username in a column, based of an existing Person column.

I have had success implementing this basic formatting:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "[$Person.title]"
}

And this has also worked for: [$Person.email], [$Person.id].

But I cannot see how to access username and workemail, etc.

1 Answer 1

1

Using column formatting on Person or Group type field you can only access below properties as of now (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

2
  • By any chance, do you know if these are still the only values you can grab from a Person column? That People fields section does not seem to be on the linked page anymore. Commented Apr 8, 2022 at 3:52
  • 1
    Yes, people fields still support the same properties in JSON formatting. I have updated the link in above answer, thanks. Commented Apr 8, 2022 at 12:52

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.