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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Large Sharepoint Onlin...
Power Apps
Unanswered

Large Sharepoint Online List, Best practice to filter gallery by current Office365 user or use a different way

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have a rather large SharePoint online list that users need access to view their latest list items, however the list has some sensitive list items that i do not wish for other users to see anyone elses,

 

The app is the fairly standard 3 screen model app created through sharepoint.

 

Previously on apps ive built the gallery would on load briefly show everyones and all the latest entries until the filter would "kick in" and apply only showing the current user.

 

Is this the best practice code to filter the gallery on the homescreen

 

Set(clearVar, "");Set(gvarUserEmail, User().Email);Set(varDateDiff, DateAdd(Today(), -31, Days));ClearCollect( 
 RecordsCollection, 
 Expenses 
);Set(CurrentUser, User()); Set(CurrentUserEmail, Lower(User().Email))

 

 

Am i best somehow collecting the data on the startup?

 

this app also needs to be offline so how do i edit the collection and keep the changes applied until connection.connected? whilst showing the user on next load etc?

 

Could someone help me with this problem.

Categories:
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    From the given information, the codes in OnStart property looks reasonable. What is the Items property of Gallery? That is, Is there anything wrong with the gallery?

     

    If you want to achieve offline capabilities, I recommend you read this blog, it provides a detailed example of building these offline capabilities, you can learn from it.

    If you have any question on it, please feel free to post back.

    Sik

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-siky-msft wrote:

    Hi @Anonymous ,

     

    From the given information, the codes in OnStart property looks reasonable. What is the Items property of Gallery? That is, Is there anything wrong with the gallery?

     

    If you want to achieve offline capabilities, I recommend you read this blog, it provides a detailed example of building these offline capabilities, you can learn from it.

    If you have any question on it, please feel free to post back.

    Sik

     


    Its more the code displays everyones data at the start of the app for a brief second. Is there someway to include the code in the Onstart part of the app so the gallery only displays the current user the entire time?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous 

    A very simple quick fix might be to just add a blank landing screen with a timer on it and a Loading Spinner GIF. Then, OnTimerEnd --> Navigate to gallery. Set the Timer duration to what suits your load time?

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    OK, how did you define the Gallery.Items property

    I doesn't suggest you save the filtered SharePoint list to Collection at startup if your SP list has more than 2000 records, since the clearcollect isn't delegable, it can only get 2000 (maximum) records from the list.

     

    As an alternative workaround, please try to modify the Gallery.items property as follows to see if the issue is fixed.

    If(!IsBlank(gvarUserEmail), Filter('SP list', ColumnName=gvarUserEmail))

    Sik

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard