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.
First of all; thank you again for all your extended help; I'm learning so much!
I've executed your suggestion and it works when I add a new Person to the list. I'm not quite sure why I put in the second row in the condition (the - OR: when 'Created' (from trigger outputs) is equal to 'Modified' (from trigger outputs).
In my brain this prevents the 'If yes' path to take place when there is a modification? Because that's wat happens: when I change a name, nothing happens.
Femke11 1st condition is for updating Name/Email when person column has been changed
2nd condition is for updating Name/Email when new item is created in the list.
I have test both the scenarios and it is working fine for me. Please test it thoroughly from your end. Sometimes Power automate flow takes some time to run the trigger hence name/email columns will not be update immediately after updating the list item.
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.
- ganeshsanapJun 14, 2023MVP
Femke11 Yes, you have to change the value completely. Not just clear the value and save the same value again.
Also, there will be one extra flow run as you noticed. That's why we have added conditions in the flow to avoid any further flow runs and infinite loop issues.
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 14, 2023Copper ContributorTried to test run again. First time I deleted my own name, and put in my own name. That didn't work.
Now I've tried it again; changed it to another name and now it works! Both with a change in the name and with the creation of a new row it works fine! Flow will run two times - first a 'yes' path, then a 'no' path.