cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
rhoward
Level: Powered On

Offline CRUD For Real

Has anyone been able to do true Offline CRUD with PowerApps?  Is the Twitter example really the best PowerApps can do?

 

MS is one small step away from a truly killer mobile apps platform if they add true offline "CRUD" features.

 

Rich

2 REPLIES 2
rhoward
Level: Powered On

Re: Offline CRUD For Real

A follow up We need an example of what PowerApps can do today with table based “CRUD” operations.  The twitter example is not a database or CRUD example.

 

If someone at PowerApps made a very simple sample app that shows basic add, edit and delete of table data (CRUD) in both online and offline scenarios that would be perfect for now.  Just use these simple assumptions:

 

Setup is This:

  • A single table. Call it Companies with a few fields.  Fields don’t matter: Its offline CRUD that matters.
  • Show adding, editing existing and deleting companies.
  • Show this being done online and offline.

 

Usage is This:

  1. User starts online for initial install of app and data download to phone.
  2. User does edits while online.
  3. User does edits while offline.
  4. Phone syncs data when back online.  Prefer manual syncing: its more to the point.  It’s how to do offline CRUD with syncing online that matters.

 

The Big Questions:

 

Which is better approach? 

  1. Initial download to Collections then app UI tied only to Collections with Collections later writing back to Data Source.
  2. Each screen testing for live connection and either writing to Data Source or Collection.

Wont B need also an eventual sync of Collections to Data Source as in A. anyway?  Is A therefore the only possible way to go?  Is A in the end simpler also? 

 

Since you can’t bind EditForms to collections, you must use big Collect statements that reference every control.  Ouch. 

 

The big need is to have PowerApps do the syncing itself, directly off of its Tables.  No Collections involved.  CRUD smarts need to be done on Tables.  MS Mobile Apps with Azure SQL already do this, so that team has the knowhow and code.

 

Darshan said PowerApps is working on the “writing” piece of offline features in a “Phase 2” (https://powerusers.microsoft.com/t5/PowerApps-Ideas/Offline-mode/idi-p/825/page/7#comments ).  “Phase 1” was what he called the Jun release of offline (caching data offline which is what the Twitter sample shows.)  Can someone ask Darshan to do a short blog on offline CRUD?  I am assuming he is talking about offline CRUD when he says Phase 2.  Use another term than "CRUD" for those not from a database background. 

 

PowerApps Team Motivation:

CRUD, Transactions and Concurrency is a beast from the SQL world that may be fully needed in a SQL world, but not fully needed in PowerApps.  Still a basic add, edit and delete offline is what PowerApps needs right now.  And I got to say this, does PowerApps team really appreciate that they are sitting on a killer mobile app development tool?  With full offline syncing, PowerApps will have a complete end to end foundation for enterprise mobile that no one will come close to for at least a year.  So please complete the offline features first: it's foundational to the system and it can rocket PowerApps to the front for a long while!

 

Rich

Community Support Team
Community Support Team

Re: Offline CRUD For Real

Hi @rhoward,

 

Firstly I should say I don't know any better codes for PowerApps to work offline with data source CRUD operations.

You may take a look at the response from Staff CarlosFigueira from the following thread:

Does the PowerApps solution have capability for offline working

 

The point here is,  for each operation, we need to create a corresponding collection to hold the data, and then a local file (use SaveData) for temporary storage.

 

And as you already noticed, form control can't work with Collections, so if record details from collection need to be shown in a screen, we need to add controls one by one, and use formula to map the value.

For edit, I think it should be similar to the scenario for detailscreen mentioned above.

 

So I would suggest to build another two screen other than the auto-generated three screen, then add two gallery in the first screen, build condition to check connection status, if online, first screen show the gallery with items configured with data source directly, if offline, show the collection gallery.

With the offline, configure the collection gallery with proper navigation to the newly added two screen,  configure the detail screen and EidtScreen with corresponding controls, then build up the collection for each operations. 

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,793)