Hi All -
I know there have been some threads about saving an application while offline, however, I am still slightly confused with the best approach.
To give some context, I am creating a tablet app that will be used in a hospital ward in Malawi Africa. A doctor will be inputting information as he sees a patient and will have no internet connection. Can someone recommend the best way to have it saved on the tablet until a connection to the internet is available. At that time it can then be synced back to the SharePoint list?
If this is not possible, does anyone have any other recommendations?
Thank you!
Brandon
Solved! Go to Solution.
Hi BKlyn,
I assume that it might be possible.
Please take this documentation for a reference:
https://powerapps.microsoft.com/en-us/blog/build-offline-apps-with-new-powerapps-capabilities/
To create a SharePoint offline app, firstly, you may need to load the data on the startup of the app.
Please try to set the screen’s OnVisible property likes following:
If(Connection.Connected,ClearCollect(localtest,List1.Title);UpdateContext({statustext:"Online data"}),LoadData(localtest,"local",true);UpdateContext({statustext:"local data"}));LoadData(localtesttopost,"local",true);SaveData(localtest,"local")
Secondly, you may need to add a button to save the new item to the data source.
Please try to set the button’s OnSelect property likes following:
If(Connection.Connected,Patch(List1,Defaults(List1),{Title:TextInput1.Text}),Collect(localtesttopost,{localTitle:TextInput1.Text});SaveData(localtesttopost,"local"))
Last, according to the documentation, we may try to add a Timer control to auto save the data pending in a collection to the list. At here, you may consider to use the ForAll function.
https://powerapps.microsoft.com/en-us/tutorials/function-forall/
If(Connection.Connected,ForAll(localtesttopost,Patch(List1,Defaults(List1),{Title:localTitle}));Clear(localtesttopost),Collect(localtesttopost,{localTitle:TextInput1.Text});SaveData(localtesttopost,"localtest"))
Please have a try with it. Hope this could be your reference.
Best regards,
Mabel Mao
Hi BKlyn,
I assume that it might be possible.
Please take this documentation for a reference:
https://powerapps.microsoft.com/en-us/blog/build-offline-apps-with-new-powerapps-capabilities/
To create a SharePoint offline app, firstly, you may need to load the data on the startup of the app.
Please try to set the screen’s OnVisible property likes following:
If(Connection.Connected,ClearCollect(localtest,List1.Title);UpdateContext({statustext:"Online data"}),LoadData(localtest,"local",true);UpdateContext({statustext:"local data"}));LoadData(localtesttopost,"local",true);SaveData(localtest,"local")
Secondly, you may need to add a button to save the new item to the data source.
Please try to set the button’s OnSelect property likes following:
If(Connection.Connected,Patch(List1,Defaults(List1),{Title:TextInput1.Text}),Collect(localtesttopost,{localTitle:TextInput1.Text});SaveData(localtesttopost,"local"))
Last, according to the documentation, we may try to add a Timer control to auto save the data pending in a collection to the list. At here, you may consider to use the ForAll function.
https://powerapps.microsoft.com/en-us/tutorials/function-forall/
If(Connection.Connected,ForAll(localtesttopost,Patch(List1,Defaults(List1),{Title:localTitle}));Clear(localtesttopost),Collect(localtesttopost,{localTitle:TextInput1.Text});SaveData(localtesttopost,"localtest"))
Please have a try with it. Hope this could be your reference.
Best regards,
Mabel Mao
This was perfect, thank you so much!
Show less
User | Count |
---|---|
254 | |
126 | |
104 | |
49 | |
49 |