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.
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
@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?
@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?
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
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
199 | |
99 | |
59 | |
59 | |
55 |
User | Count |
---|---|
257 | |
161 | |
88 | |
79 | |
69 |