Skip to content

Dataverse

Power Apps Dataverse Offline Mode For Canvas Apps

Power Apps Dataverse Offline Mode For Canvas Apps Posted by - Matthew Devaney on - June 11, 2023 36 Comments With the all new Power Apps Dataverse offline mo...

Matthew Devaney
Published
Reading time
8 min read

Before you start

Is this guide for you?

Best entry point
Dataverse
Time investment
8 min read

Imported reference from Matthew Devaney's blog for learning purposes. Original: https://www.matthewdevaney.com/power-apps-dataverse-offline-mode-for-canvas-apps/. Author: Matthew Devaney.

Power Apps Dataverse Offline Mode For Canvas Apps Posted by - Matthew Devaney on - June 11, 2023 36 Comments

With the all new Power Apps Dataverse offline mode it’s easier than ever to build an offline capable mobile app. I am surprised by how little coding it takes to setup. Now offline mode is mainly a configuration task. No more LoadData and SaveData functions. Granted, you’ll need Dataverse to use this method and there are limitations . But this is definitely the way of future. In this article I’ll show you how to build an offline mode for canvas apps. Table of Contents Introduction: The Field Inspections App

Setup A Field Inspection Dataverse Table

Allow The Dataverse Table To Be Used Offline Build A Field Inspections Canvas App

Enable Dataverse Offline Mode In The Advanced Settings Menu Create A Dataverse Offline Profile Configure The Dataverse Offline Profile

Apply The Dataverse Offline Profile To The Canvas App Insert An Offline Status Indicator Icon

Understanding The Offline Status Indicator Icon

Test The Offline Cavnas App On Tablet & Phone

Limitations-Of-Power-Apps-Dataverse-Offline-Mode Introduction: The Field Inspections App

The Field Inspections app is used by mechanics at a construction company to inspect heavy duty vehicles. Inspections are done in the field where there is not always an internet connection available so the app must be able to work offline.

Setup A Field Inspection Dataverse Table

Create a Dataverse table named Field Inspection with the following columns Name (Single-line text) Inspection Date (Date only) Inspection Result (Choice: Pass, Fail) Inspection Notes (Multi-line text)

Populate the Field Inspection Table with the following sample data: Name Inspection Date Inspection Result Inspection Notes Backhoe (#BA-92435) 6/9/2023 Pass Lorem ipsum dolor. Bulldozer (#BU-29217) 6/9/2023 Pass Lorem ipsum dolor. Bulldozer (#BU-30015) 6/8/2023 Fail Lorem ipsum dolor. Compactor (#CO-67176) 6/7/2023 Pass Lorem ipsum dolor. Compactor (#CO-97701) 6/7/2023 Pass Lorem ipsum dolor. Dump Truck (#DU-46258) 6/7/2023 Pass Lorem ipsum dolor. Excavator (#EX-21789) 6/6/2023 Fail Lorem ipsum dolor. Grader (#GR-37016) 6/5/2023 Pass Lorem ipsum dolor. Scraper (#SC-18687) 6/5/2023 Pass Lorem ipsum dolor. Trencher (#TR-37271) 6/5/2023 Pass Lorem ipsum dolor.

Allow The Dataverse Table To Be Used Offline

Each Dataverse table in an offline canvas app must be enabled for offline use. Open the Dataverse table properties. Check the Can be

taken offline box and press the Save button. Build A Field Inspections Canvas App

We want to focus on how to configure our Power Apps to be offline capable and not spend much time on building a custom app. Therefore, we will create an app from our Field Inspection table as opposed to starting from a blank app.

Open Power Apps studio, select Create an app and then choose Select an existing table .

Select the Field Inspection table and press the Create app button.

An app will be generated based upon the Field Inspection table we created.

Enable Dataverse Offline Mode In The Advanced Settings Menu

Power Apps Dataverse offline mode is currently an experimental feature. It must be enabled in the Advanced Settings menu before we can use it. Open the Advanced Settings menu and go to Upcoming Features . Then select the Experimental tab and toggle on the Dataverse offline setting.

Then go-to the General tab and turn on the Can be used offline setting . An auto-generated offline profile is generated by default but we will create our own custom offline profile and apply it here in a few moments. Create A Dataverse Offline Profile

Making a custom Dataverse offline profile offers greater control over which data is brought into the canvas app. With a custom profile we can filter tables and store only the records we need offline. By comparison, an offline profile generated by Power Apps will bring in all records for every table in the app.

Go to the Power Platform Admin Center and locate the environment the Field Inspections app was built in. Then open the Settings menu.

Expand the Users + permissions menu and select Mobile configuration .

Create a new profile named Field Inspection App User . Configure The Dataverse Offline Profile

Now that the Dataverse offline profile has been created we must select which tables and records will be brought into our app. Open the Field Inspection App User offline profile and press the Add Table button. Add the Field Inspection table.

We can define which records we want to bring into the canvas app. In this example we will choose All Rows.

But many times when designing an offline canvas app we may want to choose Organization Rows > User’s rows to download only records belonging to the user.

Once the table configuration is saved it will appear in the list.

Apply The Dataverse Offline Profile To The Canvas App

Back in Power Apps Studio we update the Select offline profile setting to use our newly configured profile. Choose Field Inspection App User from the dropdown menu. Insert An Offline Status Indicator Icon

It is important for an offline app user to know the status of any data changes made within the app and whether they have synced from the server. Power Apps studio includes an offline app template with this pre-built feature. We can take it from the template to use for our own design.

Add a new screen using the Offline template.

The globe icon in the top-right corner of the template is the offline indicator. Copy the Globe icon from the template screen…

…and paste it into the the Field Inspections App titlebar. Delete the template screen this is done. We no longer need it.

Understanding The Offline Status Indicator Icon

The offline status indicator icon will change to reflect the current state of the app. Here is a list of all the status indicator icons and their meaning.

This Switch function is found in the Icon property of the icon. It controls which icon should be shown based on the app’s status. Switch ( Connection .Sync , ConnectionSync .Connected , Icon .Globe , ConnectionSync .ConnectedWithWarning , Icon .GlobeWarning , ConnectionSync .ConnectedPendingUpsync , Icon .GlobeChangesPending , ConnectionSync .ConnectedError , Icon .GlobeError , ConnectionSync .ConnectedRefresh , Icon .GlobeRefresh , ConnectionSync .NotConnected , Icon .GlobeNotConnected , ConnectionSync .NotConnectedWithWarning , Icon .GlobeWarning , ConnectionSync .NotConnectedPendingUpsync , Icon .GlobeChangesPending , ConnectionSync .NotConnectedSyncError , Icon .GlobeError ) Code language: CSS ( css )

The app user may also tap the icon to get more information about the app’s status. This code is found in the OnSelect property of the icon. Switch ( Connection .Sync , ConnectionSync .Connected , Notify (" Your device is connected to the network , and your app is ready to work offline .", NotificationType .Success ), ConnectionSync .ConnectedWithWarning , Notify ( Connection .LastSyncMessage , NotificationType .Warning ), ConnectionSync .ConnectedPendingUpsync , Notify (" Some data on your device must be synchronized with the server .", NotificationType .Warning ), ConnectionSync .ConnectedError , Notify ( Connection .LastSyncMessage , NotificationType .Error ), ConnectionSync .ConnectedRefresh , Notify (" Your app is currently synchronizing data with the server .", NotificationType .Information ), ConnectionSync .NotConnected , Notify (" Your device is not connected to the network , but you can keep using this app .", NotificationType .Success ), ConnectionSync .NotConnectedWithWarning , Notify ( Connection .LastSyncMessage , NotificationType .Warning ), ConnectionSync .NotConnectedPendingUpsync , Notify (" Some data on your device must be synchronized with the server . Reconnect to the network to synchronize .", NotificationType .Warning ), ConnectionSync .NotConnectedSyncError , Notify ( Connection .LastSyncMessage , NotificationType .Error ) ) Code language: CSS ( css )

Test The Offline Canvas App On Tablet & Phone

Save and publish the canvas app. Then open the app in Power Apps on tablet or phone.

The loading screen will indicate the app is being prepared for offline use during the initial load.

Now the Field Inspections app can be used in offline mode. When the tablet or phone is not connected to the internet it will store the changes on the device and sync them to the database once an internet connection is made.

Limitations Of Power Apps Dataverse Offline Mode

There are some important limitations to be aware of when using Dataverse offline-mode

No, SharePoint is not supported by this offline-mode.

Files & images are not currently supported in offline-mode but I assume they will be in the future since model-driven aps support it.

Delegation support is not yet implemented for all functions that can be delegated in Dataverse

Offline apps may not be built in the default environment

This is still an experimental feature so make sure to verify it is working as expected before deployment Did You Enjoy This Article? 😺

Subscribe to get new Copilot Studio articles sent to your inbox each week for FREE Enter your email address Sign Me Up Questions?

If you have any questions or feedback about Power Apps Dataverse Offline Mode For Canvas Apps please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion. Matthew Devaney M365 Copilot Power Apps

How To Create Copilot Custom UI Widgets In Power Apps

Share this

Tagged

Dataverse

Have a Microsoft 365 topic idea?

Share article suggestions, community session ideas, corrections, or real-world scenarios for future nextM365 learning notes.

Suggest a topic

Keep learning Microsoft 365

Explore more practical guides for SharePoint, Power Platform, Copilot Studio, migration, automation, governance, and security.

Continue learning

Next action

What to do next

Browse all tutorials →