Local Storage in Page
Used in offline storage mode in mobile apps.
Last updated
Used in offline storage mode in mobile apps.
Last updated
Page Designer has a built-in feature that allows for the creation of a local database. This database is specific to the mobile device where the application is being used. The designer has the ability to design tables, manage columns and data within Page Designer while creating the mobile application. This feature is particularly useful for offline storage of data, particularly in areas with poor network connectivity or no network access. Additionally, there is an option for local storage to synchronize with the server database once the network connection is restored.
Steps to create local database in mobile application Click on Database icon then click Plus icon to create table
Enter collection name and select collection space. Click Start Design. For sync data please refer to
Add columns to the table and enter data
Click Save and the table will be shown on the left side under Database.
Click on the Export DDL icon to export DDL and create a sync table on the server database. (If the user chooses to sync database with server)
How to use this local table to display data on screen Below are the steps to display data from local storage on the screen
Users can use the Add Action feature on the Page to read from the local database. Add an action on the load event of Page Content
Map the Card element on the page to the table read from the database using connect to DB icon.
Map the child fields within the card to the data fields in the table.
Add button to sync data with server DB, if the sync option is enabled.
Add JavaScript to sync table
When you build the app and run it, it will display the data from the local DB as shown below:
On-click of the Sync button, the system will display more data from the server as the server has more data.