Pagination and continuation pattern

Hello everyone. I built a simple coda pack to connect with Dolibar so I could share clients between Coda and Dolibar but I have a problem, the table which contains the information cannot support all the clients and needs to be limited. To solve this I need to paginate the data and use the continuation pattern to split the sync up into multiple executions but I don’t have any idea of how to do it. Please, can you help me? Thank you.

Hi Juan,

Welcome to Coda and the Community!

Could you share an example doc which illustrates your problem?

P

Hi, thank you for welcoming me. You see, the problem is that, there’s to much data and when I looked for a way to solve this problem I found out that we need to paginate the data and use the continuation patter (Add sync tables - Coda Pack SDK) but we dont know how to apply this, neither the pagination in coda.

Can you share the code? And link to the API doc that describe pagination . . . thanks!

There’s no need, we alredy soved it. To address the issue with the Dolibarr integration code, we made two key adjustments. First, we corrected the pagination function to start from page 0 instead of page 1, ensuring that the data synchronization accurately began from the beginning of the dataset in Dolibarr. Then, we modified the continuation handling so that the function could properly manage the last page of data, even if it contained fewer users than the defined BATCH_SIZE. This approach ensured a complete and accurate data synchronization process from start to finish. Thanks for your time.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.