Forum Discussion
How to pull from 'Person' field in one column to populate 'Department' of another
BShepard22 If you are not going to use those department values later, for filtering/sorting, etc. (you don't need to "save" department in column) and you just want to show the department in SharePoint list view then you can achieve it using JSON column formatting:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "[$PersonGroupCol.department]"
}
Where [$PersonGroupCol] is an internal name of your person column in SharePoint list in this format: [$InternalNameOfColumn]. You can get the internal name of your SharePoint list columns by following this article: How to find the Internal name of columns in SharePoint Online?
If you want to "save" the actual value in department column, you can create a Microsoft power automate flow to update the department field based on the Person or Group field OR
You can customize the list form using Power Apps to auto-populate department column using Office 365 Users connector and Power Apps formulas. Check: Customize a Microsoft Lists or SharePoint form by using Power Apps
Similar thread: Get Email from user and enter into SharePoint list 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.
- BShepard22Mar 04, 2024Copper ContributorI'm going to try the second option you mentioned. Thank you for this.