Sep 14, 2022 01:35 PM
Hi, I’m trying to make a script that counts the number of records based on the date created field. I don’t need any other information, just a count and would prefer not to have to make a view since my base is already cluttered. Any help would be greatly appreciated!
Sep 14, 2022 02:16 PM
Sep 14, 2022 03:46 PM
What is your level of scripting experience?
This thread has some scripts for counting the records in a table. However, if you want to count only records that meet a condition, you will have to add that logic in. These scripts were also not designed for automation scripts, so the output would also need to be adjusted for an automation.
Counting bases by date created can be a little tricky because the created time field actually has a time as well as a date, even if you do not display it.
Sep 15, 2022 09:32 AM
Thank you! I am brand new to Airtable scripting. Do you have any examples of what that logic would look like?
Sep 15, 2022 10:35 AM
You will need to get the value of the date field by using
Sep 15, 2022 11:51 AM
As @Vivid-Squid mentioned above, you can just group by date and Airtable will show you the count of the number of records.
However, it sounds like you are looking for some automated way of doing this that doesn’t require scripting?
If so, this can be done extremely easily using Make.com — even if your found count is greater than 100 records. And this doesn’t require any scripting at all.
All you have to do is use a “search records” module, and it will return the “Total Number of Bundles” for you to use in any subsequent steps.
You just need to use the “search records” module, as seen in the screenshot below. One simple step, and then all future steps will be able to use the total record count — even if the found count in greater than 100.
This is completely free and it only uses up one automation run.
Note that when you setup your Search Records module, you need to tell it the “maximum” number of records that you want it to return to you. So you could just set it to a very high number like 10,000 or 50,000. It will still only use up one automation run — but you’re just telling it the maximum number of records that you want it to return.