Help

Total records count

Topic Labels: Data Views
861 2
cancel
Showing results for 
Search instead for 
Did you mean: 
mislavlukach
4 - Data Explorer
4 - Data Explorer

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 !

2 Replies 2
FarioConsulting
6 - Interface Innovator
6 - Interface Innovator

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.

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