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
Super User
Super User

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





w0rmsp17
Frequent Visitor

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

 

w0rmsp17
Frequent Visitor

 

@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





w0rmsp17
Frequent Visitor

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





View solution in original post

w0rmsp17
Frequent Visitor

Cheer @Jcook, works

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,478)