cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
w0rmsp17
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

@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
Jcook
MVP

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





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

 

 

@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

 

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





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

@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





Cheer @Jcook, works

Helpful resources

Top Solution Authors
Users online (4,350)