I have been asked to build an app that can only be used by 'peers'. Basically, when selecting a recipient, the choices cannot include myself, my supervisor, nor my direct reports (if I have any). I would like this to be a search box with filtered gallery (forgive me if my terms are not correct!) Basically when user starts typing either a name or email address, the gallery displays people that I can select that match the search.
Any help or links to solutions is appreciated! I've read bits and pieces but I don't understand how to put them together yet. Thanks.
Hopefully this can get you started:
Office365Users.DirectReportsV2( Office365Users.ManagerV2( Office365Users.MyProfileV2().userPrincipalName).userPrincipalName).value.displayName
You can put this into the Items property of a drop-down.
It gets your UPN (user principle name), uses that to look up your manager's UPN and then gets all the direct reports for that UPN (your peers).
Note that Power Apps will throw error messages if the user does not have a manager defined. The only way around that I know is to turn on the experimental setting for 'Formula Level Error Management' but if you do so, thoroughly test the rest of your App as this can change the outcome of existing formulas in your App.
Thank you. How do I use that as a filter to exclude those names from the choices that appear in the gallery as user types in search box? (I have the search/gallery working just need to exclude ineligible choices.)
Keep up to date with current events and community announcements in the Power Apps community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!