Hi Guys,
I created an app in PowerApps, and I would like to share this with my colleagues/managers from different countries.
So how can I determine that the manager from Netherlands only can see the employees from Netherlands and the manager from Belgium only can see employees from Belgium etc.
I did this manually in my home page through Filter function. So I have one app which is filtered only for Netherlands and another app filtered only for Belgium.
My question is, how can I use only 1 app for all countries and when the users/managers log in, then they the only see his employees from his country?
I need this because otherwise I have to make all lot of Apps instead of one.
Thanks in advance!
Solved! Go to Solution.
If you had the manager was listed on the Employee table then you could use the logged in user's name to filter the table. How do you know the logged in user is a manager and what country they are from?
You could use the Office365Users connector to get the current user's country and then filter the employee table by the current user's country.
I believe that the user for PowerApps only has the same security accesses as they have in the original data source, at least, that's how it seems to work for me, in which case, if they are only cleared to see certain employees in the original data, then they will only see those same employees in the app.
Since I don't know your data source or data structure, I will provide you with some basic help. You can use the logged in user (i.e. User()) to filter your lists and galleries, so that the user only sees the data where they are listed as manager. This assumes that your data includes the manager information.
Hi @Jeff_Thorpe @MattyH ,
I will explain you guys better. I have an table called employees (columns, name, employeeID, country etc), and I have an table called accouts( columns, Email, Password and Country).
So in my homepage as you can see I have a gallery. I want when a user/manager from Netherlands logged in, then that he only can see the employee from his country (Netherlands) and this applies to other managers from different countries.
So I want when a user login that the filter function automatic will be change.
Please let me know if you need more information.
@Jeff_Thorpe If I use User() how can I filter this in my home page?
If you had the manager was listed on the Employee table then you could use the logged in user's name to filter the table. How do you know the logged in user is a manager and what country they are from?
You could use the Office365Users connector to get the current user's country and then filter the employee table by the current user's country.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
260 | |
127 | |
86 | |
85 | |
68 |