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.
@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?
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:
Best regards,
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,
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.
User | Count |
---|---|
152 | |
93 | |
84 | |
77 | |
58 |
User | Count |
---|---|
196 | |
176 | |
106 | |
96 | |
89 |