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 / Save data from a form ...
Power Apps
Unanswered

Save data from a form to a collection with the intent of working offline

(0) ShareShare
ReportReport
Posted on by 363

I have an app that uses power apps forms for creating and retrieving information stored on a sharepoint list. I want the app to have offline capabilities. Is it possible to use the SubmitForm function to write to a collection then save that collection with the SaveData function then reload using a button?

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @colbyturybury 
    You will want to put logic in your button/icon/etc that submits the form.  

    Instead of simply doing a SubmitForm, you will want to check the connection status.  Then, if connected, do the SubmitForm.  If not, then Collect(yourCollection, yourForm.Updates)

     

    I hope this is helpful for you.

  • colbyturybury Profile Picture
    363 on at

    That works great but just a few more steps are needed. By all the help you have provided lately(Thankyou so much by the way) you might see that I am making a field reporting app. Well sometimes those service guys have no service. I want to save the data from the form and be able to reload it if the app either crashes or does not have service. Also I need to have more than one submission save if they do multiple submissions during their field report.

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @colbyturybury 

    Yep!  I know exactly what you are talking about as I've built that app!!  Field service.  The guys have spotty internet or none.  They need to keep on going disconnected and when they connect, all submits then submitted.

    In that app, I essentially have a collection that acts as a Queue.

    Now, my app is a bit more complex because there are many different tables/lists that data goes to.  So a single collection for each datasource would have been overkill.

    My approach instead was a generic Queue collection.  In that collection is stored a JSON formatted text of the record for the data source.  

    Once the internet signal comes back, there is a timer control that becomes enabled and the queue is all sent to a PowerAutomate flow as one "payload" of multiple JSON "actions".  The flow then is designed to know what to do with each action.

    SO...forms did not apply in this case because there was just too much customization for controlling the above steps.  Things needed to either submit (to flow) when done, or store in Queue for when connected, and save to device in case of crash.

    What ultimately became the architecture was that everything went through the Queue.  The controls around the queue would determine connectivity.  The queue was ALWAYS saved to device when it had a new action in it (in case of crash or spotty internet where the connection would be lost during the transaction to the flow).  Then a constant queue timer would repeatedly do the connection check and try to empty the queue.  If so, it cleared the queue and stored, if not, it would pick up on the next timer end.  Another key to this was a transaction ID from the flow.  If the app did not get a transaction ID back from the flow, it considered it not done.

    Incidentally...waiting on a complex flow to complete can take a long time - enough time for the field tech to lose connection.  So, the "front-end" flow is quick.  It takes the payload sent and stores it and then returns a transaction ID.  In this particular app, the payload is stored in SQL and then a trigger fires to process it, but the app doesn't have to wait for that...just the flow - very quick.

    There are a lot of other aspects to the app and that process that I could write a book about.  The app has been in use for over a year now with up to 200 techs working on it in the field daily.  So far no data loss or complications. (knock on wood!)

     

    So yeah...kind of familiar with what you are doing 😉

  • colbyturybury Profile Picture
    363 on at

    Your app is an amazing use case and really demonstrates the power of power apps. You should create a video demonstrating the app. I am a junior developer that was thrown into app development in my firm. You have been so helpful.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @colbyturybury 

    Yes, I have considered pulling certain patterns out of the app and doing videos on them.  If I did one on the app in general...it would be a long one!!

  • colbyturybury Profile Picture
    363 on at

    Why not do a series then? There is some really good training out there. There are a handful of people that do advanced content but no one does extremely advanced topics. I would like to have a solid understanding of JSON within the power apps environment. I never really understand what I am doing beyond what the tutorial is giving.

  • MrsRDj14 Profile Picture
    168 on at

    Hi @RandyHayes just reading through this post and I am trying to achieve the same thing. I wondered if you ever did create a video?

  • PaulUK86 Profile Picture
    43 on at

    I also am doing something very similar! A link to how to setup the offline stuff described above would be much appreciated if it exists!

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 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard