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 / Error message in offli...
Power Apps
Answered

Error message in offline mode still after setting in for offline use

(0) ShareShare
ReportReport
Posted on by 293

Hi! I'm currently working on a scan mobile app that is able to work offline. I'm currently using an Excel file in my OneDrive as database during the test phase, later it might use SP list or the same Excel in OneDrive.

The thing is I can't avoid the big red error messages on top of the screen when the app starts. This is the code:

 

 

 

OnStart:
If(Connection.Connected;
ClearCollect(ColDespacho1;Despacho1);;SaveData(ColDespacho1;"ColDespacho1Local");;
ClearCollect(ColDespacho2;Despacho2);;SaveData(ColDespacho2;"ColDespacho2Local");;
ClearCollect(ColDespacho3;Despacho3);;SaveData(ColDespacho3;"ColDespacho3Local")
;
LoadData(ColDespacho1;"ColDespacho1Local"; true );;
LoadData(ColDespacho2;"ColDespacho2Local"; true );;
LoadData(ColDespacho3;"ColDespacho3Local"; true )
)

 

 

 

Then I have one Button that let's the user select wich collection to use, this is the code:

 

 

 

OnSelect: 
If(Connection.Connected ; ClearCollect(
 DespachoActual;
 Switch(
 ListaDespachos.Selected.Value;
 "Despacho1";
 ColDespacho1;
 "Despacho2";
 ColDespacho2;
 "Despacho3";
 ColDespacho3
 ); {DespachoCargado: ListaDespachos.Selected.Value}
);;
SaveData(DespachoActual; "DespachoActualLocal")
;
LoadData(DespachoActual; "DespachoActualLocal";true))

 

 

 

 

After that there's a gallery and a DataTable only for view that have "DespachoActual" as their origin. There's no other call for the database at all but I keep getting the error message as soon as the app starts. Even when I only had the button and the OnStart property I had the error message. Is like it completly ignores the if statement with the Connection.connected formula and tries to connect to the online files anyway

BTW: in the code the ; are , and ;; is ; for you guys since I'm from Argentina and PowerApps in Spanish works this way for some reason. I can translate the code if it's hard to read.

Categories:
  • FacundoGorla Profile Picture
    293 on at

    FacundoGorla_0-1600961960420.png

    These is my database. Could it be that it always try to connect even if it's not called anywhere in the app?

  • Verified answer
    FacundoGorla Profile Picture
    293 on at

    Found the answer and it might be really usefull to a lot of people. 

    If you use the OneDrive conector tu use a Excel as a database it will ALWAYS try to conect to it. It's the OneDrive conector behaviour.

     

    I use exactly the same code with a SP List and a static Excel and it doesn't give me the error.

    So if you want to use offline mode you CAN'T use OneDrive conector.

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 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard