cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TonjeWaa
Advocate I
Advocate I

Make array with employees that shared same manager

I am sending out an email to all the managers of the employees in a SharePoint list. Some have the same manager. In the email, I am going to have the names of the employees of the manager, separated by comma. 

 

Every employee has a row in a SharePoint list with the name of the manager. 

How can I get the information that I need to make this work?

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-LilyW-msft
Community Support
Community Support

Hi @TonjeWaa 

Do you want to send every manager an email with all his employees?

If the names of these managers are unique in your organization, you can refer to the screenshot below.

This is my test list.

vLilyWmsft_13-1643164839822.png

Flow in details.

vLilyWmsft_1-1643164293252.png

vLilyWmsft_2-1643164305117.png

vLilyWmsft_3-1643164359552.png

vLilyWmsft_5-1643164408667.png

Exoression:

items('Apply_to_each_2')?['Employees/DisplayName']

vLilyWmsft_6-1643164515461.png

vLilyWmsft_2-1643165169084.png

Expression:

substring(outputs('Compose'),0,sub(length(outputs('Compose')),1))

vLilyWmsft_7-1643164572108.png

vLilyWmsft_8-1643164606100.png

vLilyWmsft_9-1643164628001.png

vLilyWmsft_10-1643164650340.png

Save and test the flow.

vLilyWmsft_1-1643165114946.png

After flow runs, managers will each receive an email.

vLilyWmsft_14-1643164884043.pngvLilyWmsft_0-1643164945908.png

Hope the content above may help you.

Best Regards

If my answer helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @TonjeWaa 

When column is a Yes/No field you want to filter query, Yes/No Columns be evaluated as 1/0.

So please try:

vLilyWmsft_0-1643269688902.png

Best Regards.

 

View solution in original post

7 REPLIES 7
v-LilyW-msft
Community Support
Community Support

Hi @TonjeWaa 

Do you want to send every manager an email with all his employees?

If the names of these managers are unique in your organization, you can refer to the screenshot below.

This is my test list.

vLilyWmsft_13-1643164839822.png

Flow in details.

vLilyWmsft_1-1643164293252.png

vLilyWmsft_2-1643164305117.png

vLilyWmsft_3-1643164359552.png

vLilyWmsft_5-1643164408667.png

Exoression:

items('Apply_to_each_2')?['Employees/DisplayName']

vLilyWmsft_6-1643164515461.png

vLilyWmsft_2-1643165169084.png

Expression:

substring(outputs('Compose'),0,sub(length(outputs('Compose')),1))

vLilyWmsft_7-1643164572108.png

vLilyWmsft_8-1643164606100.png

vLilyWmsft_9-1643164628001.png

vLilyWmsft_10-1643164650340.png

Save and test the flow.

vLilyWmsft_1-1643165114946.png

After flow runs, managers will each receive an email.

vLilyWmsft_14-1643164884043.pngvLilyWmsft_0-1643164945908.png

Hope the content above may help you.

Best Regards

If my answer helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you so much - this worked beautifully 😃

One more thing. I need to only get participants that have to true/false fields set to false. I have tried to filter the "Get items", but it doesn't work. Maybe because it is too many filters? I have to filter on 3 things. Do you have a suggestion?

Hi @TonjeWaa 

Could you provide me the configuration of your Filter Query in Get items?

Best Regards.

TonjeWaa
Advocate I
Advocate I

Here it is:

TonjeWaa_0-1643265894129.png

The first one is a parameter that you give when you start the flow, the to others are yes/no fields. (Ja=yes, Nei=no). I have tried with true/false, but same outcome. Nothing gets returned. 

Hi @TonjeWaa 

When column is a Yes/No field you want to filter query, Yes/No Columns be evaluated as 1/0.

So please try:

vLilyWmsft_0-1643269688902.png

Best Regards.

 

TonjeWaa
Advocate I
Advocate I

Thank you so much for your help - again!! Hehe

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,152)