cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Auto save when switched from offline to online

Hello,

 

I have designed an app which contains multiple screens with multiple fields(Such as age,address and other user related info) that a user must fill. This app works in offline mode, where the user fills the data and saves the data into a collection. So if I connect to the internet the data must automatically patch to a SharePoint list. Is this scenario possible considering that I have around 10 screens and I might be at any screen at any time and I must not know that the data is being patched to the list. Thanks in advance for your suggestions.

 

Thanks,

TD

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver II
Resolver II

Re: Auto save when switched from offline to online

Yes, its possible.
Refer this code:

If(Connection.Connected,
ForAll(Collection,
Patch(DataSource,
columnname1:collectionColumn1,
columnname2:collectionColumn2
)
)
)

 Feel free to ping me, if your issue not solved.

View solution in original post

4 REPLIES 4
Highlighted
Resolver II
Resolver II

Re: Auto save when switched from offline to online

Yes, its possible.
Refer this code:

If(Connection.Connected,
ForAll(Collection,
Patch(DataSource,
columnname1:collectionColumn1,
columnname2:collectionColumn2
)
)
)

 Feel free to ping me, if your issue not solved.

View solution in original post

Highlighted
Frequent Visitor

Re: Auto save when switched from offline to online

Thanks for your response, I have tried this but I faced an issue where I want it to work irrespective of which screen I am in so does it mean that I need to have the code in every screen.

Highlighted
Resolver II
Resolver II

Re: Auto save when switched from offline to online

If you want to save your all screens record in one record.
Then do one thing Patch as soon as Internet Connect and Set a variable so that you know whether it patched or not.
Then Collect that patched record ID and then update record based on that ID.
If this not your exact query then explain please.

Highlighted
Frequent Visitor

Re: Auto save when switched from offline to online

Thanks your suggestion helped me, I'll mark your reply as the solution

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,720)