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

Direct Reports of several managers at once

Is there a way to look for the Direct Reports of several managers at once? 

 

I can get this to work

Office365Users.DirectReports("JohnDoe@somewhere.com")

 

But have tried several combinations to also get the Direct Reports of JaneDoe@somewhere.com  in the same field to no avail 😑

 

@v-siky-msft --> copying you here since you're the awesomest 😁

1 ACCEPTED SOLUTION

Accepted Solutions
EricaBao
Microsoft
Microsoft

@mguerra 

Suggest you use a collection to save all DirectReports of different managers.

 

I have made a test on my side, please take a try:

 

ClearCollect(colManagers,"JohnDoe@somewhere.com","JaneDoe@somewhere.com"); ForAll(colManagers,Collect(colDirectReports,Office365Users.DirectReports(colManagers[@Value])))

View solution in original post

2 REPLIES 2
EricaBao
Microsoft
Microsoft

@mguerra 

Suggest you use a collection to save all DirectReports of different managers.

 

I have made a test on my side, please take a try:

 

ClearCollect(colManagers,"JohnDoe@somewhere.com","JaneDoe@somewhere.com"); ForAll(colManagers,Collect(colDirectReports,Office365Users.DirectReports(colManagers[@Value])))

View solution in original post

Thank you very much... this was exactly what was needed. The collection also works perfectly to patch back to a multi-selection people picker in a SPO library. 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (26,208)