web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / User level permission ...
Power Apps
Answered

User level permission in a power app

(0) ShareShare
ReportReport
Posted on by 40

I had the below working so that only people in the Approvers list could see all items and everyone else just sees items they create. For some reason, something must have changed because approvers. can no longer see any items, not even their own.  If I add myself to the group, I can see everything. Also, if I take my self out, I can only see ones created by me, so I do not understand what could be wrong. Below is my code and an explanation of some of the items. Can anyone see what is wrong here?

 

 

Approvers list is a Sharepoint list and Admin is a people lookup column where I have each user on a separate row. This list no one has access to but me. the PowerApp list all the users have edit permission in with the exception of "manage lists" which is unchecked.

 

Onstart code:

Set(
varUser,
User()
);

 

 

Set(
IsUserAdminSPList,
!IsBlank(
LookUp(
'Approvers list',
Admin.Email = varUser.Email
)
)
);

 

Gallery Items:

If(
IsUserAdminSPList = true,
Filter(
'PowerApp', StatusDrpDwn.Selected.Value = Status.Value || StatusDrpDwn.Selected.Value = "Sort By Status"
),Filter(
'PowerApp', 'Created By'.Email=User().Email && StatusDrpDwn.Selected.Value = Status.Value || 'Created By'.Email=User().Email && StatusDrpDwn.Selected.Value = "Sort By Status"
)
)

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @mgm05e ,

    You should be able to do it all in one as below

    With(
     {
     wAdmin:
     !IsBlank(
     LookUp(
     'Approvers list',
     Admin.Email = varUser.Email
     ).ID
     )
     }, 
     Filter(
     'PowerApp', 
     (
     StatusDrpDwn.Selected.Value = Status.Value || 
     StatusDrpDwn.Selected.Value = "Sort By Status"
     ) &&
     (
     wAdmin ||
     'Created By'.Email=User().Email
     )
     )
    )

    I assume you are testing for the existence of a record here. Clearly IsUserAdminSPList is not working as they would not have created any records.

     

    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.

    Visit my blog Practical Power Apps

     

  • mgm05e Profile Picture
    40 on at

    @WarrenBelz I am not following what you mean by "I assume you are testing for the existence of a record here. Clearly IsUserAdminSPList is not working as they would not have created any records." But it did not work unfortunately. It appeared to work when I tested it by adding my name to the list, but for some reason it doesn't work for anyone else in the list. The  IsUserAdminSPList  is supposed to set check the admin column and and check if the people in that columns email matches the users.  I used this video a while back and it was working at first. https://youtu.be/J-hMMXrKMVE?t=472.

    Is it possible that some other permission is affecting this? I am the only one who has full control so that is all I can think of.

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @mgm05e ,

    I need to assume that the logged in user has access to the 'Approvers list' as they need to read it to set the Variable,  so yes, this could be a permission issue. There also needs to be a record in the list where the Admin (I assume is a Person) Field contains the email address of the logged-in user (and then they can see all records).

     

    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.

    Visit my blog Practical Power Apps

     

     

  • mgm05e Profile Picture
    40 on at

    Hello @WarrenBelz. I currently have the Admin's with view permission to the 'Approvers list'. Is this sufficient? The column uses the person look up field which does contain the email address of the logged in user.

     

     

  • Verified answer
    WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    @mgm05e ,

    It should work - you need to test it with this on a Label - it should show true if the person is Admin

    !IsBlank(
     LookUp(
     'Approvers list',
     Admin.Email = varUser.Email
     ).ID
    )

    however you said it was a Lookup field - I assumed you mean a Person field ? If a lookup field, what is it looking up and the user also needs access to that list as well.

     

    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.

    Visit my blog Practical Power Apps

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard