PowerApps Offline Mode

PowerApps is a great platform for creating custom business applications that can be used on desktop and mobile devices. Canvas apps in PowerApps are used to create custom user interfaces and forms. These apps can be built from scratch or based on pre-built templates.

However, what happens when there is no internet connection? In such scenarios, offline apps become a necessity. In this blog post, we will explore how to enable offline canvas apps using PowerApps.

Here are the steps for building an offline canvas app in PowerApps:

  • Create a new canvas app: To create a new canvas app, go to the PowerApps portal and click on “Create app” in the left-hand menu. Select “Canvas app” and then choose a blank canvas or a pre-built template to start from.
  • Enable offline mode: In the app settings, turn on the “Offline capability” toggle. This will enable offline mode and allow you to use the app without an internet connection.
  • Configure data sources for offline use: To use data offline, you need to configure the data sources used in the app to be available offline. This can be done by going to the data source settings and turning on the “Enable offline” option.
  • Create local collections: To store data offline, you need to create local collections in the app. Local collections are temporary tables that can be used to store and manipulate data within the app. You can create local collections by going to the “View” tab in the ribbon and selecting “Collections”. Create a new collection and specify the fields you want to store.
  • Sync data with the data source: When the app is in online mode, you need to sync the data stored in the local collections with the data source. You can do this by creating a button that triggers the “Patch” function to update the data in the data source. Some functions to deal with data in offline mode are SaveData(), LoadData(), and ClearData().
  • Check the internet connection on the device running the app. Connection.Connected() will return true or false, depending on the status of the connection. you can use this code once your app starts, to decide to load data from local files or from your online data source
  • This special expression can monitor the connection status of the device running Power Apps Mobile. It requires no parameters within the parentheses and evaluates in the formula to either true (online) or false (offline).
  • Design app for offline use: When designing the app, keep in mind that it will be used offline. Use labels or text boxes to inform users when the app is in offline mode. Use the Notify function to inform users when the app goes offline or comes back online.
  • Test the app: After building the app, test it in both online and offline mode. Test to see if data is being stored in the local collections and if it is being synced with the data source when the app is back online.

In conclusion, offline canvas apps can be a valuable addition to any business that needs to work without an internet connection. PowerApps provides the tools and features necessary to create these apps quickly and easily. By following the steps outlined in this blog post, you can create an offline canvas app that meets your business needs.

Contact us to help in building your offline Application.