cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
Mr-Dang-MSFT
Power Apps
Power Apps

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

v-xida-msft
Community Support
Community Support

Hi @Anonymous ,

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.
Anonymous
Not applicable

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. 

Hi @Anonymous ,

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.
Anonymous
Not applicable

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
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (3,375)