Skip to main content
Community site session details

Community site session details

Session Id : MFrK01PZN7RZqZ1ietZOGZ
Power Apps - Building Power Apps
Unanswered

Row Level Security on Power Apps issue

Like (0) ShareShare
ReportReport
Posted on 15 Nov 2022 15:25:06 by

I have a power app in which users will need to select enter data relating to their accounts and sites. 

 

I want users to only see accounts which only relate to them within a dropdown box when they log in to the app. 


The Items property of my dropdown box is Choices([@'Operational Review Commentary_1'].'UKI Accounts')

I have the following formula within the onstart property however this doesn't seem to work as my accounts Sharepoint list is a reference list and the email field is within this list. Is this the right approach if not how would I ensure that my dropdown only shows the accounts related to the user logged in  

Set(
varUser,
User()
);
Set(
isUserSPList,
!IsBlank(
LookUp(
'UKI - Accounts List' ,
'Access Email' = varUser.Email
)
)
)

  • WarrenBelz Profile Picture
    148,983 Most Valuable Professional on 17 Nov 2022 at 02:02:49
    Re: Row Level Security on Power Apps issue

    @Anonymous ,

    So you need

    ClearCollect(
     colAccounts,
     Filter(
     'UKI - Accounts List' ,
     User().Email in 'Access Email'.Email
     )
    )

    but as noted, this is not Delegable. If you wanted the users accounts in the newest 2,000 (and had your Delegation limit set to this)

    With(
     {
     wList:
     Sort(
     'UKI - Accounts List',
     ID,
     Descending
     )
     };
     ClearCollect(
     colAccounts,
     Filter(
     wList,
     User().Email in 'Access Email'.Email
     )
     )
    )

    For your second question, there needs to be a list somewhere with the relationship between those values and then you would not use the choices (not on the second one anyway), but filter that list based on the first drop-down and display the second field records based on the filter. This is a different subject to your post and needs to be on another thread if it turns into a conversation, Has your initial query been solved ?

  • Community Power Platform Member Profile Picture
    on 17 Nov 2022 at 01:25:05
    Re: Row Level Security on Power Apps issue

    @WarrenBelz Aaaah yes, it is a multi-select person field. Thanks for making it clear. Can you please assist with one last query? 

    I have two Dropdowns titled Segment & UKIAccounts. The task is if an individual selects a segment within the segment dropdown this then filters the UKIAccounts dropdown to showcase the accounts related to that segment. Below are the Item properties of both dropdowns. Whats the best approach to this?

     

    Segment Dropdown Items PropertySegment Dropdown Items PropertyUKIAccounts Items PropertyUKIAccounts Items Property

  • WarrenBelz Profile Picture
    148,983 Most Valuable Professional on 17 Nov 2022 at 01:13:41
    Re: Row Level Security on Power Apps issue

    Hi @Anonymous ,

    At last I think the proper reason has emerged - is that a multi-select person field ? If so, you need a different filter and it will never be Delegable.

  • Community Power Platform Member Profile Picture
    on 17 Nov 2022 at 01:11:11
    Re: Row Level Security on Power Apps issue

    @WarrenBelz For some reason this is still not working. Am I missing something? The only other message which shows up is the below. 

    Only other message which shows upOnly other message which shows up


  • WarrenBelz Profile Picture
    148,983 Most Valuable Professional on 17 Nov 2022 at 01:01:27
    Re: Row Level Security on Power Apps issue

    @Anonymous ,

    I am surprised that is the only warning (it is really doing nothing) - you need to make a Collection with that code

    ClearCollect(
     colAccounts,
     Filter(
     'UKI - Accounts List' ,
     'Access Email'.Email = User().Email
     )
    )

    the colAccounts is their list.

     

    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

     

     

     

  • Community Power Platform Member Profile Picture
    on 17 Nov 2022 at 00:55:38
    Re: Row Level Security on Power Apps issue

    @WarrenBelz Sorry, I believe there may be a bit of confusion. The code I have is within the App OnStart property, therefore I have been updating the Onstart property with the formula suggested. Aim is when a user logs in this list is automatically filtered at the start therefore when an individual uses a dropdown they can only see which accounts belong to them.

    onstart filter.png

  • WarrenBelz Profile Picture
    148,983 Most Valuable Professional on 17 Nov 2022 at 00:22:24
    Re: Row Level Security on Power Apps issue

    Hi @Anonymous ,

    The list size does not matter with a Delegation warning as you might increase it in the future and Power Apps simply flags that it is not Delegable, however, if that is a Person field, it should be Delegable (see my test below with no warning)

    WarrenBelz_0-1668644403419.png

    Are you using that alone or in conjunction with other Filter/s. Can you please post the exact code you are using in Text and also a screenshot of the error.

     

  • Community Power Platform Member Profile Picture
    on 16 Nov 2022 at 23:35:34
    Re: Row Level Security on Power Apps issue

    @WarrenBelz Unfortunately, I am still getting the same error with the updated formula. My list is around 1k would this still be an issue? 

  • WarrenBelz Profile Picture
    148,983 Most Valuable Professional on 16 Nov 2022 at 23:26:02
    Re: Row Level Security on Power Apps issue

    @Anonymous ,

    Not the best column type to use with large data sets (I do not use them at all), but in this case, the below should work

    Filter(
     'UKI - Accounts List' ,
     'Access Email'.Email = User().Email
    )

     

    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

  • Community Power Platform Member Profile Picture
    on 16 Nov 2022 at 23:06:43
    Re: Row Level Security on Power Apps issue

    @WarrenBelz  Its a person or group type field in SharePoint. 

    This is the message I getThis is the message I get

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete