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 / Offline Mode - Saving ...
Power Apps
Unanswered

Offline Mode - Saving collections data to Shareppont list when back online.

(0) ShareShare
ReportReport
Posted on by

Hi Everyone,

 

I have a power app which allows employees to raise hazards using a input form, however having issues with wifi dropping off around the production area i am trying to transistion to an offline based app which saves data to a collection untill connection.connected is back online and then uploads the collection to SP list.

 

The home page for my app is below, when the connection is offline i have set the visable to false so the option when offline is to submit a new hazard.

 

jakemorris_0-1626694805708.png

this is the page for submitting a STAR the submit button has an if function where is the connection is connected it submits the form, else it collects the information in a collection called 'offline STAR'.

jakemorris_1-1626694988467.png

 

My question really is what would be a good way to send that collecton data to Sharepoint without causing issues?

I tried to use a timer on 30second refresh to patch forall the collection the Sharepoint, but i could not figure out the relationship between the collection data columns and the sp list columns (how to tie them together)

any tips or methods for achieving this would be greatly appreciated.

 

 

kind regards 

Categories:
I have the same question (0)
  • BCLS776 Profile Picture
    8,994 Moderator on at

    If you need to build in the offline capability, then set up your app so that a copy of data goes to your collection all of the time:

    1. Make sure one of the first function calls in the OnSelect of your submit button is a Collect() to put the record data in your collection
    2. Next, check the Connection.Connected status. If true, SubmitForm() your data. If false, SaveData() to internally store the data you put in the collection
    3. In the OnSuccess property of the form, put a Clear() to empty out the collection whenever the SubmitForm() succeeds
    4. My preference for UX is to let them know if they have stored data that needs saving, with a separate screen w/form they can use to LoadData and try to SubmitForm() again. The OnSuccess of this form gets a ClearData() call. This gets around the problem (and app overhead) of running a timer to do it automatically and the confusion that can happen if an autosave occurs while they are entering data in a new form that is reused as the autosave form.

    By doing it this way, you can completely avoid Patch(), which isn't a bad thing, but it reduces the complexity.

     

     

  • jakemorris Profile Picture
    on at

    HI ,

     

    thanks for the suggestion. 

     

    I have managed to get all my dropdowns in my form working offline now, using saveload/ connecting them to collection data, so i think using your method would be nice and straight forward. is there a way to submit the forms which have been Saved() once they are back online?

     

    i have followed up to step 4 but unsure the best way of re-subbmiting the data which has been saved offline back into the sharepoint list.

     

  • BCLS776 Profile Picture
    8,994 Moderator on at

    To explain a bit more about Step 4 above:

    • Use a variable to toggle a button's mode or other flag to indicate to the user that a record was saved offline and needs to be uploaded. Use this button to take them to a screen with a New Form that is largely the same as your main form
    • LoadData() back into a collection. Use the record in the collection to populate the form contents. The collection will have the same layout as the collection you used with SaveData earlier.
    • Check the data connection to ensure it is active immediately before calling SubmitForm()
    • In the OnSuccess property of the form, clear the collection used with LoadData() and then run ClearData() to delete the offline file

    If the user has the ability to save more than one form offline, you will want to wrap most of the steps in a ForAll statement to ensure all the records get submitted.

     

    This is still a high-level explanation, but as you get into it and run into specific issues, reach out for more help.

  • jakemorris Profile Picture
    on at

    Morning, Thank you I’ll give this ago when I get some time later on and let you know how I get, really appreciate the help.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard