cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dyee4613
Helper V
Helper V

PowerApps Offline Mode

Hi.  I used the below video to create offline mode for my apps.  It works great if the app is still open.  However, if my users are in a disconnected environment it's unlikely they'll keep the app open the whole time.  When I submit the collection then close the app, it doesn't submit when it's back in internet range.  Anyone have any modifications I can make to fix this?

Thank you @mrdang for this wonderful video.  https://www.youtube.com/watch?v=j30xOM5OmRE

 

 

2 REPLIES 2
v-monli-msft
Community Support
Community Support

Hi @dyee4613 ,

 

PowerApps use collections and leverage functions such as LoadData and SaveData for basic data storage when offline. Can you please share the related formulas? Especially the formula that you use to LoadData and SaveData.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-monli-msft .  I have added the code.  I'm guessing my problem is I don't have load data set up.  Should on visible be something like loaddata(temporary)

 

Here is my offline functionality:

Set(wait,true); Set(Counter,Counter+1);

 

If(ToggleIsConnected.Value,
"If you are connected to the internet, then write the data to the database.";
    Patch(Table2,Defaults(Table2),
        { date1: date2.Text,
          Section: S.Text,
          Crew: C.Text,
                                }
                                  ),

"If you are NOT connected to the internet, then write the data to a temporary collection to be written later.";
Collect(temporary,
     {id: Max(temporary,id)+1,
      date1: date2.Text,
      Section: S.Text,
      Crew: C.Text,
                            }
                              );
SaveData(temporary,"temporary"));

Set(wait,!true);ResetForm(Form1)

 

This should be pretty much exactly the same code as the video.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (18,047)