cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SamkitJain
New Member

Powerapps not working offline for android

Hello all,

 

I have create a simple app using save data and load data.

It's working offline on windows, but its giving me error "Something went wrong. There seems to an issue with your Internet connection. Please try again. If this issue persists, please contact your administrator." on my android device.

 

Android Device: Samsung Galaxy S9

Android Version: 10

App Version: 3.20115.14

 

My code onStart:

SamkitJain_0-1609000803708.png

If for some reason you are unable to see the attached screenshot here is the code:

If(Connection.Connected = true,
Clear(HeaderTable);
Collect(HeaderTable, ForAll(AssetMaintenanceWorkOrderTables, {WorkerId: 'Work order (WorkOrderId)', Description: Description}));
SaveData(HeaderTable, "HeaderTableSaved"),
LoadData(HeaderTable, "HeaderTableSaved"))

 

Please suggest.

 

Thanks in advance

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @SamkitJain ,

Try this

If(
   Connection.Connected, 
   ForAll(
      AssetMaintenanceWorkOrderTables As wAsset,
      Collect(
         HeaderTable,	  
         {
            WorkerId: wAsset.'Work order (WorkOrderId)', 
            Description: wAsset.Description
         }
      )
   );
   SaveData(HeaderTable, "HeaderTableSaved"),
   LoadData(HeaderTable, "HeaderTableSaved")
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hello @WarrenBelz,

 

It was working first time offline. But later got the same error.

PowerappsOffline.jpeg

@SamkitJain ,

That is nothing to do with the code - it is saying you do not have internet on the device.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz,

 

We require to build an app that works offline. I followed this tutorial PowerApps Offline Mode - YouTube.

And this app is working fine in windows even if internet is not connected.

 

Thanks and Regards 

Hi @SamkitJain ,

What I am saying is that there is nothing wrong with the code and it should work on a mobile device (as you have mentioned, in worked in a browser offline). You could try this, but it is really the same thing

If(
   Connection.Connected, 
   ClearCollect(
      HeaderTable,
      ShowColumns(
         RenameColumns(
            AssetMaintenanceWorkOrderTables,
            "Work order (WorkOrderId)",
            "WorkerId"
         ),
         WorkerId,
         Description
      )
   );
   SaveData(HeaderTable, "HeaderTableSaved"),
   LoadData(HeaderTable, "HeaderTableSaved")
)

I avoided this as your field Work order (WorkOrderId) contains spaces and special characters, which means the reference above may not be correct. You really should try and avoid these.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,708)