I have a list, how can I do something like what pagingInfo does? I want to pass in batchNumber and batchSize and get the part from the list.
The list is not queried from record, it is from an api response, but the api response was not paged. I was blocked when I tried to create a record type using this api, so I was thinking maybe I can page the response in recordDataSource file. Is there any other ways that I can do this without changing the api?
Discussion posts and replies are publicly visible
Convert it into Datasubset by wrapping it in todatsubset(), where you can use sorting and paging.
fxzrqjzztrmy said:I was blocked when I tried to create a record type using this api, so I was thinking maybe I can page the response in recordDataSource file.
Can i know what you mean by this, i'm not able to understand it properly
Thank you! I got this warning when configure the datasource and can not proceed: "The Record Data Source cannot return more than 1,000 records in a single batch. Batch size was 2,174"
you can convert your data into datasubset using todatasubset() function. something like below
todatasubset { your data from Api }, a!pagingInfo(startIndex: 1, batchSize: 10) )
once you have datasubset you can easily use in paging grid.
Got it, thank you!
Does that API not support any kind of paging? If the data volume increases, you will run into timeout or memory issues sooner or later.
Option 1: It is highly recommended to implement pagination at the API level if it fits your use case. This approach would be optimal.
Option 2: Consider using the datasubset function to create a subset of the entire dataset you received, which can then be utilized in the grid.