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

Add "DisplayName" of manger for list users

I want to build list Sharepoint with all users of my organization and the name of their managers.

Translate image :

  • Rechecher des utilisateurs (V2) = Get Users (V2)
  • Filtrer la liste des utilisateurs = Filter list of users 
    • Filtrer utilisateurs bloqués = Filter blocked users (remove blocker users)
    • Filtrer les boîtes ... = Filter Shared Box (remove shared boxes)
  • Ajouter responsable = Add manger
    • Obtenir le responsable (V2) = Get manager (V2)
    • Sélectionner = Select

I have not found how to put "DisplayName" of "Get managers (V2)" to each user on "Select"

Thanks

 

users.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @Rifton007,

 

The Display Name field of the Obtenir le responsable is not shown in the dynamic content? Normally you should be able to add that to your select.

 

Only thing I can think of is that their might be people in the company who don't have a manager. Like the CEO. This will cause the Get manager (V2) action to fail because it won't be able to find a manager for that user.

 

So, you might want to configure a run after on your select action.

 

configurerunafter_failed.png

 

And I would also suggest to use if/empty functions in your expression as well.

if(empty(outputs('Get_manager_(V2)')?['body/displayName']), 'No manager found', outputs('Get_manager_(V2)')?['body/displayName'])

 

managerdisplayname.png

 

View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @Rifton007,

 

The Display Name field of the Obtenir le responsable is not shown in the dynamic content? Normally you should be able to add that to your select.

 

Only thing I can think of is that their might be people in the company who don't have a manager. Like the CEO. This will cause the Get manager (V2) action to fail because it won't be able to find a manager for that user.

 

So, you might want to configure a run after on your select action.

 

configurerunafter_failed.png

 

And I would also suggest to use if/empty functions in your expression as well.

if(empty(outputs('Get_manager_(V2)')?['body/displayName']), 'No manager found', outputs('Get_manager_(V2)')?['body/displayName'])

 

managerdisplayname.png

 

View solution in original post

Rifton007
Frequent Visitor

Hi @Expiscornovus,

I can retrieve the displayName of manager from "Get manager (V2)" is not a problem.

I have fixed partially my problem :
I can join user with the name of their manager, but each iteration is repeated, see the image below.

 

Rifton007_0-1634831434797.png

Rifton007_1-1634831510218.png

 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,876)