Forum Discussion
Automatically fill a single text column in Lists by the value of a Person Field column
- Jun 13, 2023
Femke11 If you just want to show the email address in the list view, you can easily do it using JSON formatting like:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "[$PersonGroupCol.email]" }
Where PersonGroupCol is internal name of person or group field. You can get the internal name of your person or group column by following this article: How to find the Internal name of columns in SharePoint Online?
You can read more information about this approach in my answer given at: 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.
Thank you so much for this good explanation, it works perfectly! Do you know if other people can use the 'Get email' button in this list as well?
Femke11 If you don't want users to click on every list item/row to get the email address, you can use the When an item is created or modified trigger in the flow and use logic given by RobElliott for updating list item with email address.
To avoid the infinite flow running loop, you will need to add additional logic at the starting of flow to check if person or group column is changed since last update and based on that condition, you can update the email address column.
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.
- Femke11Jun 13, 2023Copper ContributorThanks again for this addition, but your previous suggestions works the best for me 👍