Question

hope you're doing well.

I'm on SharePoint online and looking for a solution to reduce the number of visible users in a People Picker column.

I mean, if you create a "multiline of text", you'll see that if you start writing enough in the column, SharePoint Online will give you a preview of the first few lines and hide the rest of the content.

I'm trying to find out if there is a possibility to have a people picker doing the same. I have a list with a people picker field enabled for multiple users. one item has 20 users, the other one has 50 users so that makes the list being very long only because of this. I'd like to find a way for SharePoint to show only the first 5 users.

Hope some can help me on this.

Thanks a lot in advanced

Was it helpful?

Solution

Currently there is no OOB way to meet yout requirement.

As a workaround, we could use column formatting to judge characters exceed to determine if all the people will be shown.

If the selected people exceeds 30 characters, show "More than 5 users", if not, show the selected users.

After doing this, if you want to see all users, you need to select the item then check all users.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "=if(indexOf(@currentField.title +'^','^')>=30,'More than 5 users','@currentField.title')"
}

My test result for your reference:

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top