In the dropdown or combo box I want see all the manager and senior manager under me .
and manger reporters
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
Solved! Go to Solution.
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")
)
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")
)
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
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.
is it possible through dropdown?
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?
yep only direct reports of 2 managers
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)
)
error is there in dropdown
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.
User | Count |
---|---|
258 | |
108 | |
93 | |
57 | |
40 |