cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
omi18
Post Partisan
Post Partisan

Limit Datatable to reporting Team Entries

Hello Team,

 

I am trying to show records of only direct reports to the user. Using Office365Users connector. I am retrieving reporting people data from the SQL server. 

 

Any help will be great. 

 

Thanks,

Omkar 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @omi18 

 

To configure this, you can use the expression as:

Filter(DataSourceTableName, ColumnName in Office365Users.DirectReportsV2(User().Email).value.mail)

Here, DataSourceTableName needs to be replaced with the SQL table name and ColumnName should be replaced by the column name which stores the email address of the reportee to match.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

3 REPLIES 3
douglasromao
Kudo Kingpin
Kudo Kingpin

Hi @omi18 , could you elaborate a little bit more of your scenario?

Hi @douglasromao,

 

Sure, I am building an app as a front and of our sql database. Lets say I have 3 employees in database. a,b and c. a and b reports to manager x and c reports to manager y. In the app there is a section called my team, where manager wants to see people who are reporting to him or her. So manager x should see only a and b. And manager y should see c.

 

for this I am using azure active directory as a hierarchy. Defined by my company. So that I was trying to use office365 users connector. But may be I was doing it wrong.

 

Any would be great.

thanks.
omkar 

Hi @omi18 

 

To configure this, you can use the expression as:

Filter(DataSourceTableName, ColumnName in Office365Users.DirectReportsV2(User().Email).value.mail)

Here, DataSourceTableName needs to be replaced with the SQL table name and ColumnName should be replaced by the column name which stores the email address of the reportee to match.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,996)