Users want to use an app offline to add and edit data.
High level resolution steps
- Introduction to the Dataverse Offline App
- How to create an app with offline functionality
Detailed resolution steps
Step 1: Change the settings of the Canvas app to support offline functionality. To do this, enable the “Can be used offline” option. An offline screen template will then appear on the screen.
Step 2: Add tables to the app, I’ve added Field Services.
Step 3: On the screen, you will have a Header container and a Main Screen container. In the Main Screen container, insert a gallery and set its Items property to Field Services. Then, insert an Edit form and set its data source to the table name.
Step 4: In the form’s Item property, set it to Gallery1.Selected. To allow record editing, add a button and name it “Save.” On Select property of Save button give SubmitForm(Form2)
Step 5: To add a new record, in the Header container, add a new button and name it “NEW+.” Then, add another screen and name it the “Creation Screen.” Set the “OnSelect” property of the “NEW+” button to navigate to the creation screen.
Step 6: On the creation screen, add another form. Insert a “Create” button and set its “OnSelect” property to SubmitForm followed by navigation back to the previous screen.
Step 7: To delete a selected record, add a delete icon to the Header container. Set the “OnSelect” property of the icon to Remove (TableName, Gallery.Selected).
Step 8: Once these steps are complete, the app will function offline. When the app is offline, records will be stored in the cache memory. Once the device reconnects to the network, the records will be synced with the backend.