Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Mar 08, 2021 04:13 AM
I have grouped some fields in my Airtable. How can I get a specific “count” or a “sum” with API?
How can I access this data through API? I am interested in getting the different counts and sums for each group. I.e: Score_act: sum 41 Task: “Jeg har koblet av med noe underholdende”: count 4 (times this task had been completed).
Is this possible?
Regards,
Tor M
Mar 08, 2021 05:58 AM
Unfortunately, Airtable provides no native ability to access any of the values that show up in the summary bar. You can’t access them via formula fields, nor can you access them via the API. (This applies to both the grouping information and the summary values themselves — both are off-limits to us.)
This is one of the big limitations of Airtable. I would highly recommend emailing support@airtable.com to ask them to please implement this feature in the future.
The only way that you can natively get “counts” or “sums” (or any other summary values) in Airtable is to link the records in your current table to other records in another table — and then you can create rollup fields to provide the summary information to you based on the linked records.
Otherwise, you’d have to do all of your grouping, counting, and summarizing on your own using some other methodology.
So, for example, you could write your own custom JavaScript script to group & summarize your records. My guess is that most people are using JavaScript to do this.
Or, if you don’t know JavaScript and would like a low-code/no-code way of doing this, you can do what I often do which is to use Integromat. Integromat communicates with Airtable via its API — and then gives you the ability to group records & summarize those groups of records using the Aggregator tool:
Similarly, I’ve also used Apple’s FileMaker to do this as well. FileMaker is an advanced database language that allows full programmatic access to summary information, plus programmatic access to an unlimited amount of sub-summary information (e.g. groups within groups within groups, etc.).
FileMaker also enables you to call API’s in other programs, so I’ve used FileMaker to bring records from Airtable into FileMaker by using Airtable’s API, and then I do all of the grouping & summarizing & custom reporting & custom PDF report creation within FileMaker.
FileMaker is an expensive tool, though, so it‘s not right for everyone.
p.s. I am a professional Airtable consultant, a Certified FileMaker Developer, and a Registered Integromat Partner, and the Integromat link contains my personal referral code. If you have a budget for your project and you’d like to hire an expert to help you with any of these things, please feel free to contact me through my website at ScottWorld.com.
Mar 08, 2021 06:55 AM
This is absolutely the case. The API (and for that matter, all the Airtable SDKs) have no visibility into the UI/UX processes that are used to create the vastly superior Airtable app. As such, when you leave the warm and inviting realm of Airtable itself, you are on your own. It’s like leaving home to spend time in the desert - you best pack a lot of stuff in a camper.
Mar 08, 2021 07:59 AM
Thank you for a good and informative answer!
I´ll check some of the options you listed, Integromat sounds interesting.