@VinodJ87 To enable pagination for an API Data Page when the source is a Data Transform or Activity (instead of a Report Definition), you can use the paging parameter provided by the DX API. Include the pageNumber and pageSize properties in your JSON request payload to specify the desired page and the number of items per page. Within your Data Transform or Activity, implement custom logic to handle the paging parameters from the request. Extract pageNumber and pageSize from the parameter page or API input and apply them to limit the data returned. For example, use a loop or filter to fetch the appropriate subset of data based on the page and size values. By processing these parameters manually in the backend logic, you can achieve similar pagination behavior as a Report Definition-based source, ensuring the API Data Page supports the desired paging functionality.
whatever we pass inside “dataViewParameters” it will be copied to parameters by default by Pega. But could not find where this “paging” information is getting set, when a request comes in -
@VinodJ87 In Pega, when you send a request with a paging object (containing pageNumber and pageSize) to a Data Page via the DX API, Pega automatically maps these values to standard clipboard properties, pyPageNumber and pyPageSize. While dataViewParameters are copied to the parameters section by default, paging details are handled separately. These pyPageNumber and pyPageSize values are accessible within the Data Page context. If your source is a Data Transform or Activity, you can retrieve these properties directly from the clipboard to implement custom pagination logic. Use these values to slice or limit the data returned, ensuring the response adheres to the requested page size and number. You can verify this behavior by checking the clipboard during runtime under pxRequestor or pyWorkPage. This approach ensures you can effectively handle pagination even when the source is not a Report Definition.
This may not work if your source is Activity or Data transform. Ideally, the pagination is passed to your report definition(pyPagingParams) to limit the records and page number based on your crieria.