Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Show my created projects and the created projects of my subordinates employees

(0) ShareShare
ReportReport
Posted on by 39

Hello everyone,

I hope someone can help me with the following scenario. I have the following collection, which stores the subordinates of my manager. So I retrieve them and save them in the collection.

 

 

ClearCollect(mySubordinatePersons;
'Office365User'.DirectReportsV2('Office365User'.MyProfileV2().mail).value
);;

 


I also have a variable that saves my login file.

 

 

Set(
vCurrentUser
; First( 'Office365-User'.SearchUser({searchTerm: User().Email})
));;

 

 

I have a small app that displays projects in a gallery.
I want that the gallery show only my projects and those of my subordinates. So if you don't have any subordinates, the app should only show my projects.

I would love to see some Hints. You Guys are awesome! Thanks for Help!

 

 

Categories:
  • Marczii007 Profile Picture
    Marczii007 39 on at
    Re: Show my created projects and the created projects of my subordinates employees

    Yes excactly. I have to test it with managers :'D
    Im not in this position right now. 

  • Verified answer
    NPPlatform Profile Picture
    NPPlatform 606 on at
    Re: Show my created projects and the created projects of my subordinates employees

    @Marczii007  Awesome! Does this formula also account for the situation where you do have Subordinates, but also want to see your own projects?

    If not, I think the formula that does account for that situation would be something like:

     

    && Or(
            'Einreicher Mail' in mySubordinatePersons.mail,
           'Einreicher Mail' = vCurrentUser.UserPrincipalName
    )

     Best of luck!

  • Marczii007 Profile Picture
    Marczii007 39 on at
    Re: Show my created projects and the created projects of my subordinates employees

    thanks, i got it.

     

    in items property of my gallery
    
    && If(
     CountRows(mySubordinatePersons) > 0,
     'Einreicher Mail' in mySubordinatePersons.mail,
     'Einreicher Mail' = vCurrentUser.UserPrincipalName
     )
  • Verified answer
    NPPlatform Profile Picture
    NPPlatform 606 on at
    Re: Show my created projects and the created projects of my subordinates employees

    You'll need a Filter()-statement around your Items of the gallery. This filter should define that you only want projects where ProjectOwner (or however you can see what 'my projects' are) is equal to vCurrentUser or one of the values in mySubordinatePersons. I don't know what the exact names / columns in your app are, but it could be something like:

    Filter(ProjectDataSource, Projectowner = vCurrentUser || Projectowner in mySubOrdinatePersons). 

     

    || is the operator in Power Apps to indicate an Or()-statement. This means that either the first or the second filter-statement has to be true for a row to be shown in the gallery.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard