Forum Discussion
How do I grab the last user information entered into a peoples column that allows multiple entries?
- Nov 27, 2023
Spawn10 Check below JSON and example which will help you with your final solution. I am fetching the name of last selected user from people column using JSON formatting:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "=if(length([$GuestUsers])==1,[$GuestUsers.title],substring(join([$GuestUsers.title],'||'),lastIndexOf(join([$GuestUsers.title],'||'),'||')+2,indexOf(join([$GuestUsers.title],'||') + '^', '^')))" }Output:
Where GuestUsers is the name of multiple selection allowed people column. You can get the exact internal name of your column by following this article: How to find the Internal name of columns in SharePoint Online?
Similar thread: JSON Formatting to show last item select from multi selection choice field
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Spawn10 Check below JSON and example which will help you with your final solution. I am fetching the name of last selected user from people column using JSON formatting:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=if(length([$GuestUsers])==1,[$GuestUsers.title],substring(join([$GuestUsers.title],'||'),lastIndexOf(join([$GuestUsers.title],'||'),'||')+2,indexOf(join([$GuestUsers.title],'||') + '^', '^')))"
}
Output:
Where GuestUsers is the name of multiple selection allowed people column. You can get the exact internal name of your column by following this article: How to find the Internal name of columns in SharePoint Online?
Similar thread: JSON Formatting to show last item select from multi selection choice field
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.