cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Offline issue

Hi All,

 

 I am creating an powerapps for offline. I have one button which takes some input from user and save into  JourneyCollection3. And send data to cds when the device has internet connection.

I am facing an issue for following flow- disconnects internet , open the offline app, take some data in offline mode from user and then come online and click on button which sends data to CDS. It throws an error saying "Value must be a data entity record"

But this is working- internet connection is present, opens an app, then disconnects internet , take some data in offline mode from user and then come online and click on button which sends data to CDS.

I have below code on app Onstart-
Set(varGIF,true);
//delete above

LoadData(
JourneyColletion,
"Saveitemstokeep",
true
);
LoadData(
JourneyColletion2,
"Saveitemstokeep2",
true
);
LoadData(
JourneyCollection3,
"Saveitemstokeep3",
true
);
//put code here
If(
Connection.Connected,//Route
ClearCollect(
RouteCollection,
Routes
);
SaveData(
RouteCollection,
"Saveitemstokeeproutelookup"
),
LoadData(
RouteCollection,
"Saveitemstokeeproutelookup",
true
);

);
If(
Connection.Connected,//Bus
ClearCollect(
BusCollection,
Buses
);
SaveData(
BusCollection,
"Saveitemstokeepbus"
),
LoadData(
BusCollection,
"Saveitemstokeepbus",
true
);

);
Set(varGIF,false)

 

Any help expert @WarrenBelz ?

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Anonymous ,

I will give you one piece of advice which others may disagree with, but if you are trying to automate the on-line/off-line switch over, the sorts of issues you are facing will arise. Shane Young has a good video on his process.

I have a couple of off-line capable apps and all user uploads of offline data are manual, with the user checking they have good signal at the time.

 

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.

 

 

View solution in original post

1 REPLY 1
WarrenBelz
Super User
Super User

Hi @Anonymous ,

I will give you one piece of advice which others may disagree with, but if you are trying to automate the on-line/off-line switch over, the sorts of issues you are facing will arise. Shane Young has a good video on his process.

I have a couple of off-line capable apps and all user uploads of offline data are manual, with the user checking they have good signal at the time.

 

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
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (1,817)