If you refer to this post by @csm there seems to be a logical incosistency with the LoadData and SaveData functions that we have not been able to resolve, any ideas are welcome. Otherwise, as csm suggests, there should be a way to check for the presence of data on the device before calling the LoadData function.
Basically, LoadData/SaveData should be used to store user preferences, but if the user is opening the app for the first time or on a new device then this data is not there and an error is given by the first LoadData statement. You cannot run a SaveData statement first because otherwise it would over-write the stored preferences from a previous session. (Or at least I have not found a way around that)
I found a thread that might answer your question.
"Savedata and Loaddata are temporary. If you are looking for a permanent solution, you will want to look into the Update, UpdateIf, and Patch functions. They will record information straight into your Excel tables.
Once information is saved to your tables, you can use Refresh to reload any changes. Changes are automatically reloaded upon closing and opening the app, so you won't need to use Savedata and Loaddata."
Also, see the concept of "Savedata ans load data"：
The SaveData function stores a collection for later use under a name.
The LoadData function re-loads a collection by name that was previously saved with SaveData. You can't use this function to load a collection from another source.
LoadData doesn't create the collection; the function only fills an existing collection. You must first create the collection with the correct columns by using Collect.
Storage is encrypted and in a private location on the local device, isolated from other users and other apps.
Hi Mona, I believe the intent of SaveData and LoadData is for example to store user preferences on a particular device.
Hence the logical incosistency.
Please refer to this post:https://powerusers.microsoft.com/t5/PowerApps-Forum/Store-user-settings/m-p/13467
I'm also frustrated by this issue. Seems to me there's two simple solutions:
These capabilities have been around since VBScript days. Might be time to dust off some classic ASP...
for me its a "bug", the savedata get lost after the app is saved in powerapps designer and the app get an update or any other reason.
lets say if me save data, this are my data, no one else touch it.
Yep just found this on an app thats has true set to ignore errors. It has been running fine for last 6 months, now all of a sudden it has stopped ignoring and generates an error for new users on first access.
is there a time line for this to be fixed.????
Still not fix...
The error is very irritating for my users. especially as there is even this extra 3rd paramter just for that.
Using the new "IfError" function doesn't help either, the error is still displayed
Check out the News & Announcements to learn more.
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.