Jun 25, 2024 03:06 AM - edited Jun 27, 2024 12:08 AM
Hi everyone,
I'm an AirTable newbie but I have some experience in web development.
I'm trying to use REST API to implement table which has a server-side pagination.
This means I can't preload all the results to get the pagination parameters like total count.
Usually, the API endpoint which returns the records would have this parameter. Unfortunately it doesn't exist so I'm wondering how to do this properly without fetching all the results on FE beforehand.
Thanks for the help !
Jun 27, 2024 12:43 PM
Hi,
I would suggest that you look into Airtable API's pagination feature. After fetching the initial 100 records, you can include the "offset" value from the response in the next request to retrieve the next set of records.
Jun 27, 2024 08:00 PM
You could try solving this in the base itself by:
1. Creating a table called "Record count"
2. Ensuring all records that are created in your main table are linked to a single record in "Record count" called "Summary" or something
3. Create a Count field in "Record count" to get the number of linked records
4. Pull that "Summary" record on page load to get the total count