cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Saving a form offline

Hi,

 

We are migrating from SP on-prem to SP online and I have a list with a Infopath form which I was able to recreate in the "test" migration list on SP online. I have put a couple of hours on this form and I want to save it offline so I can reuse it when we do the final migration.

 

Is there an  easy way to do this?

 

Thanks

 

 

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Saving a form offline

Hi @marcguilmette ,

Could you please share a bit more about your scenario?

Do you want to save the form structure (including field structure and entered data) Offline or just the entered form data Offline?

 

If you want to save the form structure (including field structure and entered data) Offline, I afraid that there is no way to achieve your needs in PowerApps currently.

 

If you just want to save the entered form data Offline, I think the SaveData function could achieve your needs. On your side, when you save your form data, you could use the If function to detect if you are online or offline. If online, save the form data back to your SP List directly, if offline, save the form data into a collection, then cache the collection into your local device.

 

On your side, please consider set the OnSelect property of the "Submit" button to following:

If(
   Connection.Connected,
   SubmitForm(EditForm1.Updates),
   ClearCollect(LocalFormData, EditForm1.Updates);SaveData(LocalFormData, "LocalFile");ResetForm(EditForm1)
)

 

Add a Timer control in your app, set the Duration property to following:

1000

set the AutoStart property and Repeat property to following:

true

set the OnTimerEnd property to following:

If(
   Connection.Connected,
   ForAll(
          LocalFormData,
          Patch(
                'SP List',
                Defaults('SP List'),
                {
                  Title: LocalFormData[@Title],
                  Column2: LocalFormData[@Column2],
                  Column3: LocalFormData[@Column3],
                  ...
                  ...
                }
          )
   );Clear(LocalFormData)
)

 

Set the OnStart property of the App to following:

LoadData(LocalFormData, "LocalFile", true)

 

More details about creating a Offline App in PowerApps, please check the following blog or video:

https://powerapps.microsoft.com/en-us/blog/build-offline-apps-with-new-powerapps-capabilities/

https://www.youtube.com/watch?v=1TAG8S_AWgw

 

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.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,674)