cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Andie
Frequent Visitor

Bind a table (database) by item id

I have one table where all the elements are related by their number. That is, each office, user, and employee Department has a number. Everyone has an id. I can 't change the table itself!!! Whether I can link all elements in power apps by id to a single collection. So that the user logs in and sees the data intended for their Department.

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @Andie ,

You can certainly restrict this in a number of ways.

There are many other possibilities including adding have a control list with the user's email and their department - I will call it RefList and the fields RefDept and UserEmail in the example below. A gallery Items property would be

Filter(
   YourDataSourceName,
   Lookup(
      RefList,
      UserEmail = User().Email
   ).RefDept = Department
)

Also if you want to only display the records created by the logged-in user, you can have a gallery with the Items property

Filter(
   YourDataSourceName,
   'Created By'.DisplayName = User().FullName
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

eka24
Super User III
Super User III

Hi @Andie, To be able to filter based on a user, you should have a column that has email or FullName. Then you can:
Filter(
DataSourceName,UserEmailColumn=
User().Email)
With this the user would see records of only his department

View solution in original post

2 REPLIES 2
WarrenBelz
Super User III
Super User III

Hi @Andie ,

You can certainly restrict this in a number of ways.

There are many other possibilities including adding have a control list with the user's email and their department - I will call it RefList and the fields RefDept and UserEmail in the example below. A gallery Items property would be

Filter(
   YourDataSourceName,
   Lookup(
      RefList,
      UserEmail = User().Email
   ).RefDept = Department
)

Also if you want to only display the records created by the logged-in user, you can have a gallery with the Items property

Filter(
   YourDataSourceName,
   'Created By'.DisplayName = User().FullName
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

eka24
Super User III
Super User III

Hi @Andie, To be able to filter based on a user, you should have a column that has email or FullName. Then you can:
Filter(
DataSourceName,UserEmailColumn=
User().Email)
With this the user would see records of only his department

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (5,671)