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

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 Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

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