cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver II
Resolver II

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

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver II
Resolver II

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

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.

View solution in original post

2 REPLIES 2
Highlighted
Resolver II
Resolver II

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

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?

Highlighted
Resolver II
Resolver II

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

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.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,876)