Jun 18 2022 05:04 PM
Hello, I have two columns in a SPO list. One has a people picker for the data type and the other is a text column. I am trying to autoupdate the text column with the email address of the person selected from the people picker column. Is this possible without the use of Power Apps form customization?
Jun 19 2022 12:13 AM
Jun 19 2022 03:35 AM
@RADical6142 Do you just want to show the email in list view or store the value in column & use it somewhere else?
If you just want "display" value in list view, you can use JSON formatting on column like:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "[$PersonGroupCol.email]"
}
Output:
If you want to store the value in column & use it somewhere else, you can create a power automate flow to update the Email address field based on the Person or Group field.
Check my answer given in this thread where I have explained same scenario in detail: 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.
Jun 20 2022 10:11 AM
@ganeshsanapThank you for your reply.
I need to use the email address field in a flow, so option 1 probably wouldn't be ideal.
I tried option 2 from the article you mentioned, but the flow fails every time it runs.
Jun 21 2022 01:54 AM
If I got you right you want to populate the e-mail address of the selected person from the people picker column into an additional field, to make use of it within a different Flow.
A People Picker column is a so-called complex field, which consists of multiple attributes.
One is the e-mail address already, thus you can make use of it directly without any further steps.
Anyhow I would suggest to check for the validity of the selected person always, as any People Picker selection does not get verified regular once added and accounts tend to get disabled over time.
A potential way could be the following example (my people picker column is simply named 'Person').
I check for the user profile by removing the pre-fix of the Claims from the people picker, which returns the accounts UserPrincipalName.
Then two parallel actions, one has a 'configure run after' defined from within the three dots to run only if the action 'Get user profile (V2)' has failed, means it could not find the user in question from the people picker column.
As you might not want your Flow to do certain things each time a record is updated randomly, you could either accept a Flow run and set a condition to be checked for at the beginning or skip the Flow run by specifying additional trigger conditions.
https://tomriha.com/a-simple-way-to-create-a-trigger-condition-in-power-automate/
Jun 30 2022 12:44 PM
SolutionI tried the solution, but it kept giving me an error. I ended up trying a few different solutions and this worked for me.
Thanks!
Aug 31 2022 03:27 AM
Aug 31 2022 04:02 AM
@aasthas121294 Use this:
"txtContent": "[$PersonGroupCol.title]"
Please consider giving Like if my post helped you in any way.
Jun 30 2022 12:44 PM
SolutionI tried the solution, but it kept giving me an error. I ended up trying a few different solutions and this worked for me.
Thanks!