Managing reference data with large data pages
Managing reference data with large data pages
Using large data pages to store reference data in your application can help improve the performance of a mobile app. Only individual records of the large data page that have changed are synced, not the entire set of records. Large data pages also enable more efficient memory management. Only records needed to render a specific screen on the mobile device are loaded to the device's memory, leaving the remaining parts of reference data in the device's permanent store.
Large data pages are created using the standard data page record type. After the data page is created, you declare it as a large data page by adding it to the pyDataPageWhiteListForOffline rule. Large data pages can be automatically sourced from report definitions. You can also source large data pages from a connector, an activity, or a data transform, but a custom JavaScript populator function is required.
In the report definition used as the data page source, add the following two columns in addition to the columns needed to retrieve the reference data:
- pyModificationDateTime – This column returns the time when the large data page was previously synchronized to the client. The data source uses it to return only the records that were modified after the last data synchronization.
- pyIsRecordDeleted – This column returns true only for records that have been removed. Correct values for all key columns should also be returned for such removed records. The data source always maintains removed records tracking in order to return appropriate values. Manual removal of rows is still possible, but you force a full sync of all of the access groups that use the data source in offline-enabled apps.
After you create the data page, declare it as a large data page. To do this, edit the whitelist for the List of data pages that are available offline but are not referenced directly in the UI. Add the name of the data page followed by ;large. For example, to declare the data page D_FieldMappings as large, enter D_FieldMappings;large in the HTML source. Add additional large data pages on separate lines.