0

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

0

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

2
  • Hi @Julie_MSFT, thanks a lot for your answer. that's sooo cool !!! waw... but i don't have the same as you show. I have an item with 3 people, another with 5 people, another with 30 people ... and all are showing the message "More than 5 users" . would you have any idea how to fix this ? I tried to adapt the number in your code but that doesn't help> thanks – Kaddrik Dec 3 '20 at 15:04
  • AAAHHH OK !!! i understand , it counts the number of characters !!! It works then ... Cool, thanks a lot !! :-) – Kaddrik Dec 3 '20 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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