cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Seperate values from arrays

Hello Microsoft Community

 

I'm very new to Power Automate and I'm enjoying learning it a lot. I'm currently trying to wrap my head around using data operations to manipulate values in an array.

 

In my current project, I'm attempting to use the 'UserPrincipleName' (mail) values from 'Get Group members' to email all users from that group.

- The process I'm using is: 
  - Get data from 'Get Group Members',
  - (join) From 'Group Members';

  - (select) 'Get Group Members', Map - 'Group Members UserPrincipleName'

  - Create CSV table - Ouput from select data operation

 

dataoperation.png                     

 

 

 

 

 

 

 

 

 

 

 

 

I am able to use the output of the CSV data to email users

but this does not work for creating an approval process. This is because the output is not clean data.

(As seen below)

createCSV.png

 

I'm wondering if there's away to structure this output so that it can be used in a format to email an approval work flow

Any help is appreciated

thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Seperate values from arrays

@w0rmsp17 

Okay,

My mistake.. You need to use Append to string variable. Not Set variable.





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




View solution in original post

7 REPLIES 7
Highlighted
Super User III
Super User III

Re: Seperate values from arrays

Hello @w0rmsp17 

 

Instead of using data manipulation actions.

use a String variable and append each email from the Get group members to the variable,

 

It should go like this:

 

First Initialize a string variable and leave blank for now.

Next, add an Apply to each loop. Put Group Members in the input.

Next use a Set Variable action and put the Group memberUPN with a ; at the end.

 

now outside your loop you can add a Compose action. Put the variable inside Compose.

 

now the compose action will have all the emails from that group that can be used to send an email 





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Frequent Visitor

Re: Seperate values from arrays

Hello@Jcook

thank you for the response. I like the look of this solution, I'm gonna set it up and give it a go. I'll let you know how it goes.

 

Thank you again

 

Highlighted
Frequent Visitor

Re: Seperate values from arrays

 

@Jcook 

So it should look like this?

The only issue I'm having is the compose function only captures the first value in the apply to each loop. I may be missing a step in the apply to each loop

 

applyeach.png

 

Highlighted
Super User III
Super User III

Re: Seperate values from arrays

Hi @w0rmsp17 

 

Could you share a picture of the run from the Flow,

I would like to see what the values are that are being passed into the loop





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Frequent Visitor

Re: Seperate values from arrays

Hey @Jcook , thank you for the response

steps:
- i initialise a black string variable

- Create an apply to each loop (with Group members value)

- Compose with Group Member User Prinicple name

- FInally I 'set variable' to the compose output

 

this is what the run looks like

 

flowrun.png

Highlighted
Super User III
Super User III

Re: Seperate values from arrays

@w0rmsp17 

Okay,

My mistake.. You need to use Append to string variable. Not Set variable.





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




View solution in original post

Highlighted
Frequent Visitor

Re: Seperate values from arrays

Cheer @Jcook, works

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 (6,599)