cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fpc-kdrosario
Helper I
Helper I

Error - About cache file not found upon App start

Good day humans,

 

I was trying the app I created which is offline capable using LoadData and SaveData. The app works perfectly when I tested it initially.

 

Now, when I tested it on a new device, there is an error message saying that the file is not found or something. I am suspecting what caused it is the LoadData of the cache file since it is not existing on the device yet because it just downloaded the form.

 

Any ideas on how to handle such error for newly installed form that uses LoadData("cache_file")?

 

Cheers!

 

EDIT:

Here is a snippet of the code (with reservations to ensure confidential data won't be disclosed)

The code below is from the OnStart of the App.

 

ResetForm(EditMainForm);

//Loading Offline Data
LoadData(
    coll_Main_Form,
    "cache_MainForm"
);
LoadData(
    coll_SubForm,
    "cache_SubForm"
);

 

4 REPLIES 4
eka24
Super User
Super User

Can you display you formula

Good day @eka24 ,

 

I've edited my main post and included a snippet of my code which is from the OnStart of the App.

 

Cheers!

eka24
Super User
Super User

If you are loading the data for the first time on a device without the true parameter, it may throw an error. Try this
//Loading Offline Data
LoadData(
coll_Main_Form,
"cache_MainForm",true
);
LoadData(
coll_SubForm,
"cache_SubForm",true
)

This video explains it further at minute 15:30
https://youtu.be/Q91CtvIqDR0

If you like this post, give a thumbs up. Where it solved your issue, Mark as a solution
PVosEska
Resolver III
Resolver III

Please mark @eka24's response as the answer.

 

Adding the third argument argument as true ignores an empty file.

LoadData(<Collection>,<Filename>,true)

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,313)