Hello People,
I'm trying to retrieve managers email bassed on label text. But not able to get it.
I'm using: directsreportsv2 function.
Any thoughts?
Thanks,
Omi
Solved! Go to Solution.
Hi @omi18 ,
Do you want to get your manager's email?
Please notice that: Office365Users.DirectReportsV2() function is to get the direct report of the specific user, not the specific user's manager data.
1)If you only want to get current user's email, using this formula is enough:
Office365Users.ManagerV2(User().Email).mail
2)If you want to get current user's Manger's all user info , you should use formula like this:
Office365Users.DirectReportsV2(Office365Users.ManagerV2(User().Email).mail).value
Office365Users.DirectReportsV2() function could get more data than Office365Users.ManagerV2() function.
What's more, please notice that, using this formula, you will get a table with all managers.
You need to use formula like this to get specific email:
First(Office365Users.DirectReportsV2(Office365Users.ManagerV2(User().Email).mail).value).mail
Best regards,
hi there
instead of using label: this gets the logged in users manager: Office365Users.ManagerV2(User().Email).mail
its a good practice to use variables to be used in functions as oppose to label.text
the directreportsV2 will give all the emails of the users reporting to a given manager.
Hi @omi18 ,
Do you want to get your manager's email?
Please notice that: Office365Users.DirectReportsV2() function is to get the direct report of the specific user, not the specific user's manager data.
1)If you only want to get current user's email, using this formula is enough:
Office365Users.ManagerV2(User().Email).mail
2)If you want to get current user's Manger's all user info , you should use formula like this:
Office365Users.DirectReportsV2(Office365Users.ManagerV2(User().Email).mail).value
Office365Users.DirectReportsV2() function could get more data than Office365Users.ManagerV2() function.
What's more, please notice that, using this formula, you will get a table with all managers.
You need to use formula like this to get specific email:
First(Office365Users.DirectReportsV2(Office365Users.ManagerV2(User().Email).mail).value).mail
Best regards,
Scenario: I have a combo box containing list names. When the user selects any name from the combo box, the label should give us the selected person manager name.
Let me know if you need more details.
Thanks,
Omi
User | Count |
---|---|
122 | |
90 | |
88 | |
75 | |
66 |
User | Count |
---|---|
220 | |
179 | |
138 | |
96 | |
73 |