Sourcing large data pages from a report definition
Ensure that users can quickly access up-to-date reference data in your offline-enabled mobile app, such as expense report details, by improving the synchronization process. To achieve this improvement, set the source of large data pages to a report definition.
- In Dev Studio, create and configure a data type:
- Create a data type that you want to use for your data page.For more information, see Creating a data type in Dev Studio.
- On the Data model tab, click Add field.
- In the Add field to dialog box, enter the name and type of the property that you want to include in the data page.
- Optional: To add more properties to the data type, click Submit & add another.
- After you add all properties to the data type, click Submit.
- Click Save.
- Create a data type that you want to use for your data page.
- If the source of the data type is local data storage, ensure that you optimize
the pyModificationDateTime and
pyIsRecordDeleted properties by performing the
following actions:
- On the Records tab, create a dedicated table for the class by clicking Configure source.
- In the source list, add the pyModificationDateTime and pyIsRecordDeleted properties by clicking the Plus icon and selecting the corresponding property names.
- Click Submit.
- In the Review dialog box, confirm the settings by clicking Close.
- Click Save.
For more information about property optimization, see Optimizing database properties. - Create the data page:
- In the header of Dev Studio, click .
- In the Create Data Page window, in the
Label field, enter a name for the data page,
for example, Expenses.Pega Platform automatically creates an identifier for the data page, for example, D_Expenses. Do not remove the D_ from the beginning of the name.
- In the Context section, specify the class and ruleset for the data page.
- Click Create and open.
For more information, see Creating a data page. - In the Edit Data Page window, on the
Definition tab, in the Data page
definition section, define the data page as follows:
- In the Structure list, select List.
- In the Object type list, select the data type that you created in step 1.
- In the Scope list, select the scope of the data
page.
- On the Parameters tab, in the Name field, enter pyModificationDateTime.
- On the Definition tab, in the Data
Sources section, set the report definition as the source of the
data page:
- In the Source list, select Report definition.
- In the Name field, enter the name of the report definition that you created.
- Click Parameters.
- In the Parameters for window, select the Pass current parameter page checkbox, and then click Submit.
- In the Data Sources section, open the report definition by clicking the Open icon next to the Name list.
- On the Report definition tab, ensure that the data page
recognizes new or altered records by adding the
pyModificationDateTime property and by defining a
corresponding filter:
- On the Query tab, in the Edit columns section, click Add column.
- In the Column source list, select
.pyModificationDateTime.The pyModificationDateTime property registers the date and time of the most recent changes in the data source records. The changes include adding, updating, or deleting data.
- On the Parameters tab, in the Name field, enter pyModificationDateTime.
- In the Data type list, select Date Time.
- On the Query tab, in the Edit
filters section, add a filter condition and specify the
following settings:
- Condition - A
- Column source - .pyModificationDateTime
- Relationship - greater than
- Value - Param.pyModificationDateTime
- Ensure that the data page recognizes deleted records by adding the
pyIsRecordDeleted property to the report
definition:
- On the Query tab, in the Edit columns section, click Add column.
- In the Column source list, select
.pyIsRecordDeleted.The pyIsRecordDeleted property keeps track of deleted records.
- Click Save.
- Optional: To configure a refresh strategy for data pages, on the Load
Management tab, in the Refresh strategy
section, define the parameters for refreshing the data page.For more information, see Configuring the refresh strategy for data pages.
- Optional: To bind the data with data from a different class, on the Data
Access tab, in the Class joins section,
perform the following actions:
- Click Add class join.
- In the Prefix field, declare a class join by
entering the name of the corresponding data page.
- Optional: To apply a filter to the condition, click Edit conditions.
- Click Save.
Previous topic Best practices for configuring large data pages in offline-enabled mobile apps Next topic Sourcing large data pages from a connector, activity, or data transform