cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RajSaha_
Helper III
Helper III

In the dropdown I want see all the only manager and senior manager under me who is reporting to me directly or indirectly

In the dropdown or combo box  I want see all the manager and senior manager under me .
and manger reporters 

RajSaha__0-1618900541552.png
I want to see Senior manager and manager direct and indirect reporters

I'm able to see all the direct repertories I don't want to see senior and client serving contractor   

RajSaha__1-1618900638778.png

 


 

 

1 ACCEPTED SOLUTION

Accepted Solutions
JR-BejeweledOne
Super User
Super User

Add your filter like this:

 

 

Filter(
  With({myEmail: User().Email, managerEmail: "othermanageremail"},
    Ungroup(
        Table(
            {Items: Office365Users.DirectReportsV2(myEmail).value},
            {Items: Office365Users.DirectReportsV2(managerEmail).value}
        ),
        "Items"
    )
 ), 
   !(jobTitle = "Senior") && !(jobTitle = "Client Serving Contractor")
)

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

15 REPLIES 15
JR-BejeweledOne
Super User
Super User

You will need to filter the results based on Job Title then.

 

Something like this:

 

Filter(
  Office365Users.DirectReports("EmailID"),
  !(JobTitle = "Senior") && !(JobTitle = "Client Serving Contractor")
)


If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Thank you so much for your support.
now I'm able to direct reporters not the indirect reporters
in the dropdown I want see my direct reporters and another manager direct reporters

JR-BejeweledOne
Super User
Super User

The Office365Users connector only accepts a single input.    I am trying to see if there is a way to pull the information into a single combobox, but I don't think it will work.



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
RajSaha_
Helper III
Helper III

is it possible through dropdown?

JR-BejeweledOne
Super User
Super User

It's not dependent on the control you use, it's the connector itself.   I have an idea, but I need to make sure it will work.  One question will it only ever need to show the direct reports of 2 managers?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
RajSaha_
Helper III
Helper III

yep only direct reports of 2 managers

JR-BejeweledOne
Super User
Super User

I have a solution for you.   It's a little convoluted but it works.  You will either do this on App start or on a button or some other action. 

 

Set(varManagers, Office365Users.DirectReportsV2("1stManagerEmail")); 
Set(varManagers2, Office365Users.DirectReportsV2("2ndManagerEmail"));
Collect(Reports,
     ForAll(varManagers.value As _item, 
        {
            Name: _item.displayName

        }

     )
);

Collect(Reports,
  ForAll(varManagers2.value As _item, 
        {
            Name: _item.displayName

        }

     )
     
)

 

Set your Dropdown/Combobox Items property to Reports.

 

If you want to get the direct reports for the manager of the user of the app consider using this formula to set one of your Manager variables

 

Set(varManagers, 
  Office365Users.DirectReportsV2(Office365Users.Manager(User().Email).Mail)
)


If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

RajSaha__0-1618927469082.png

error is there in dropdown 

RajSaha__1-1618927558023.png

 

JR-BejeweledOne
Super User
Super User

You can't use that formula in the dropdown.   You need to set it on a button or other select property or on app start.



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (17,659)