cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Getting email value from (multiple) person column into a string

I've seen similar posts to this but struggling still to make this work.

I have a SPO List with a column (let's call it "x") that is a person field allowing multiple people.

I want to loop through the x array and specifically extract the email and out it in one string variable.

This sounds simple enough.

initialize blank variable as string called emails

Apply to each in x

append x.email + ';' to emails

 

In the end I should have ...something like this...

mickey@mouse.com

or if multiple...

mickey@mouse.com;donald@disney.com

 

It seems to work when I have a single person but not when I add the ';' to the entry and put in multiple values... can someone cut and paste their flow for this as I'm sure this has been done thousands of times.

 

Here's what I have...

sasrsc_0-1593524088176.png

Get my sp list...

sasrsc_1-1593524148938.png

 

Then the loop...the apply to each is the SP column that contains the multi persons
The value being applied is the email object in the array.



sasrsc_2-1593524209133.png

sasrsc_3-1593524407338.png

When I look at the flow I'm not 100% sure why there are 2 apply to each actions.

I am looking through an array of people which contain an individual email address.
The apply to each should be the "people"... why does it add a 2nd apply to each?
I think I'm not seeing the forest for the trees.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Getting email value from (multiple) person column into a string

 

Hi @sasrsc ,

 

Because the person field allows multiple selections, its value is an array. When you get the person email, you need to traverse the value of this field, so Apply to each appears. You can click Get items action to check the output of Body.

 

Please consider re-creating a similar flow, Apply to each automatically appear is in line with the expected results.

 

Hope that makes sense.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Getting email value from (multiple) person column into a string

 

Hi @sasrsc ,

 

Because the person field allows multiple selections, its value is an array. When you get the person email, you need to traverse the value of this field, so Apply to each appears. You can click Get items action to check the output of Body.

 

Please consider re-creating a similar flow, Apply to each automatically appear is in line with the expected results.

 

Hope that makes sense.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (8,187)