Question

I've got a SharePoint list which has a People Picker column allowing groups.

In SharePoint 2013 and in classic experience, I am able to click the group name to be taken to the group members list (and edit them as the site owner). However, in modern experience, the hyperlink doesn't work at all - it doesn't even show as a link.

Is there any way to resolve this?

Was it helpful?

Solution

In SharePoint modern experience, you get hover experience for person or group field.

When you hover over a column value, it opens a pop-up showing group or user details like below:

enter image description here

Workaround:

You can use column formatting (JSON formatting) to format the list view and generate a link which will redirect to group settings. you can refer below sample JSON to get started with:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "div",
  "children": [
    {
      "elmType": "a",
      "txtContent": "@currentField.title",
      "attributes": {
        "href": "=@currentWeb + '/_layouts/15/people.aspx?MembershipGroupId=' + @currentField.id",
        "target": "_blank",
        "title": "@currentField.title"
      }
    }
  ]
}

Note:

  1. This might not work when you add office 365 group or person to your field. I have only tested this with SharePoint groups.
  2. If you have allowed multiple values for your column then you need to enhance this code accordingly using iterators (see below reference no.1)

References:

  1. Multi-Person Facepile
  2. Use column formatting to customize SharePoint
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top