Spyglass recently helped a large manufacturer of medical devices to create a solution for their urology products. The solution is developed using Microsoft Power Apps and SharePoint Online. The Power app developed for urology devices is meant to be used by medical professionals on their mobile devices.
The offline capability of this app makes medical professionals productive even when they have limited or no connectivity to the internet.
Following are the key functions of this Power App:
When we designed offline scenarios, we first considered how the app work with data which is stored in SharePoint online lists. This Power App primarily access the data through a connector to SharePoint Online. In other scenarios, the connectors could be any of over 100 connectors available in Power Apps such as Office 365, Microsoft Dataverse, and custom connectors that enables the apps to access any services that provides a RESTful endpoint.
On the first use, as per the requirements, this app needs to read the data from SharePoint online lists hence the user must be online either on WIFI or on cellular data. On subsequent usage, the user can go offline, and the app would still function as expected through the use of Power App collections for offline capabilities. If there is any change in the SharePoint lists data, the user must go online again for the app to refresh the data.
To determine when an app is online or offline, the “Connection” signal object is used. In following two snapshots, the online and offline status is shown by the signal indicator image
In Power Apps, we can filter, search, sort, aggregate, and manipulate data in a consistent way regardless of the data source. For offline scenarios, we use local collections for data management with almost no changes to the app's logic. In fact, local collections are the primary mechanism for handling offline data.
As far as the offline aspects of app development is concerned, following screenshots shows a simple scenario of collecting the data from the data source. And then save the data to local collections and then load data back to collection for offline use.
At a high level, the app performs these tasks:
When the app starts, it shows a spinner while it connects to SharePoint online and loads all the data. To make the loading process faster, the concurrent loading is used.
Test the app
The online status image will switch to Offline.
If you have any questions about this offline capability or others that we can help you with, contact us today!