Hello,
I am looking to get help on how to show records in a gallery that were created from a Direct Report. Right now, I have the formula built out where gallery is showing records that were created by the user, or were created by the manager. but when I try to add Or Office365Users.DirectReportsV2(_myProfile.mail).value, it doesn't work. Any ideas on how to do this?
Search(
Filter(
'RAIL List',
'Created By'.Email = _myProfile.mail Or 'Created By'.Email = Office365Users.ManagerV2(_myProfile.mail).mail,
Progress.Value = "WIP"
),
SearchBox.Text,
"Title",
"Customer"
)
Solved! Go to Solution.
Hi @imadorkous ,
Office365Users.DirectReportsV2 function return a table contains all direct report members.
If there is only one direct report or you just want to show the specific one, please try this:
Search(
Filter(
'RAIL List',
'Created By'.Email = _myProfile.mail Or 'Created By'.Email = Office365Users.ManagerV2(_myProfile.mail).mail Or 'Created By'.Email = First(Office365Users.DirectReportsV2(_myProfile.mail).value).mail,
Progress.Value = "WIP"
),
SearchBox.Text,
"Title",
"Customer"
)
If you want to show all direct report, please try this:
Search(
Filter(
'RAIL List',
'Created By'.Email = _myProfile.mail Or 'Created By'.Email = Office365Users.ManagerV2(_myProfile.mail).mail Or 'Created By'.Email in Office365Users.DirectReportsV2(_myProfile.mail).value.mail,
Progress.Value = "WIP"
),
SearchBox.Text,
"Title",
"Customer"
)
Hope this helps.
Sik
Check this post which deals with it:
https://powerusers.microsoft.com/t5/Building-Power-Apps/Display-a-User-s-Direct-Reports-Using-an-Ema...
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi @imadorkous ,
Office365Users.DirectReportsV2 function return a table contains all direct report members.
If there is only one direct report or you just want to show the specific one, please try this:
Search(
Filter(
'RAIL List',
'Created By'.Email = _myProfile.mail Or 'Created By'.Email = Office365Users.ManagerV2(_myProfile.mail).mail Or 'Created By'.Email = First(Office365Users.DirectReportsV2(_myProfile.mail).value).mail,
Progress.Value = "WIP"
),
SearchBox.Text,
"Title",
"Customer"
)
If you want to show all direct report, please try this:
Search(
Filter(
'RAIL List',
'Created By'.Email = _myProfile.mail Or 'Created By'.Email = Office365Users.ManagerV2(_myProfile.mail).mail Or 'Created By'.Email in Office365Users.DirectReportsV2(_myProfile.mail).value.mail,
Progress.Value = "WIP"
),
SearchBox.Text,
"Title",
"Customer"
)
Hope this helps.
Sik
Yup, i was looking for when there are multiple direct reports, it returns all of them; so the bottom formula works. Thank you!
Hi @v-siky-msft,
I just learned about delegation warnings today, and I dont want to run into this issue, so I am taking off the search function, but looks like the IN operator would still cause some heartburn. Would there be a way around this?
'Created By'.Email in Office365Users.DirectReportsV2(_myProfile.mail).value.mail
User | Count |
---|---|
183 | |
108 | |
88 | |
44 | |
43 |
User | Count |
---|---|
226 | |
108 | |
105 | |
68 | |
68 |