cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
snickell
Level: Powered On

Saving Offline Edits

I followed along with this tutorial:

https://powerapps.microsoft.com/en-us/blog/implementing-offline-capability-in-your-app/

And I am now able to save my new forms locally, and then upload them when I'm online. However, my edits will not save locally, they just save as blank files. I know this has something to do with the fact that they are "edit forms" and not "new forms." Is there a way I can save edit forms locally for future submission when online? Thanks.

5 REPLIES 5
PowerApps Staff Mr-Dang-MSFT
PowerApps Staff

Re: Saving Offline Edits

@ThatAPIGuy has a method for working with a form's 'Updates' property. Vivek, can you share about how @snickell can collect the edits he wants to make?

Community Support Team
Community Support Team

Re: Saving Offline Edits

Hi @snickell ,

How do you save your New Form data into your local device? Could you please share a bit more about the formula?

 

Based on the needs that you mentioned, I think the "Updates" property of the Edit form could achieve your needs. If you want to save your Edit form data into your local device, please take a try with the following workaround:

Within your Edit screen, add a Button control, set the OnSelect property to following:

ClearCollect(
              LocalCollection,
              First('YourDataSource')
);
Clear(LocalCollection);
ClearCollect(LocalCollection, EditForm1.Updates) SaveData(LocalCollection, "LocalFile")

More details about SaveData function in PowerApps, please check the following article:

SaveData function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
snickell
Level: Powered On

Re: Saving Offline Edits

Collect(
newDCS1Collection,
{
ReadingTime: vDate,
Unit: vUnit,
Reactive_x0020_Power_x0020__x002: Value(DataCardValue3.Text),
Power_x0020_Factor: Value(DataCardValue4.Text),
Generator_x0020_Frequency_x0020_: Value(DataCardValue5.Text),
Generator_x0020_Voltage_x0020__x: Value(DataCardValue6.Text),
Generator_x0020_Current_x0020__x: Value(DataCardValue7.Text),
Bus_x0020_Frequency_x0020_HZ_x00: Value(DataCardValue8.Text),

 

This is how it goes for a while in my New Form data, and it works alright. This is ran when the "Submit" button at the bottom is clicked. I tried what you said with the .Updates and clearing and so on, but I think I'm running into a problem trying to get the updates, and coverterting the text value into a number. I feel like I would need to put "Value(DataCardValue3.Updates.Text)" but that doesn't work. I'm not sure, maybe there's something else wrong. 

Community Support Team
Community Support Team

Re: Saving Offline Edits

Hi @snickell ,

It is not necessary to collect data from your Edit form for each column, as a alternative solution, you could still use the .Updates property to ahcieve your needs.

 

When you want to save your New form data into a Collection, please consider take a try with the following formula:

Collect(
            newDCS1Collection,
            EditForm1.Updates
)

Note: Please make sure that the formula you used to collection New form data is the same as that to collect Edit form data.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
snickell
Level: Powered On

Re: Saving Offline Edits

I'm afraid I'm still saving blanks to newDCS1Collection. I followed how you said to do it exactly.

 

ClearCollect(
newDCS1Collection,
First('MySharepointList')
);
Clear(newDCS1Collection);
ClearCollect(
newDCS1Collection,
frmDCS1.Updates
)

 

This formula works for the new too, but not for edit. 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 413 members 5,701 guests
Please welcome our newest community members: