Simon Willison’s Weblog


The Airtable formulas at the heart of everything

23rd March 2021

Originally posted to my internal blog at VaccinateCA

While working on building a Counties.json API endpoint for VIAL I realized I wasn’t entirely sure how the “Total reports” and “Yeses” numbers in this piece of JSON were calculated:

      "County": "Glenn County",
      "County vaccination reservations URL": "",
      "Facebook Page": "",
      "Notes": "(Updated: March 22) **Eligibility**: 65+, A...",
      "Total reports": 11,
      "Twitter Page": "",
      "Vaccine info URL": "",
      "Yeses": 3,
      "id": "rec0QOd7EXzSuZZvN"

This lead down the fascinating rabbit-hole that is our Airtable formulas. Numbers like this are calculated using a combination of Airtable Rollups and Airtable Formulas, which invisibly form the heart of our entire organization.

Of particular interest: the “Latest report yes?” column on Locations, currently defined like this:

    SEARCH("Vaccinating essential workers", ARRAYJOIN({Availability Info})) != "",
    SEARCH("Scheduling second dose only", ARRAYJOIN({Availability Info})) != "",
    SEARCH("Yes", ARRAYJOIN({Availability Info})) != ""
  1, 0

Here are screenshots I gathered as I followed them back to figure out how they worked:

County “Yeses”:


County total reports:


County percentage yes:


These rollups use formulas on the Locations table:

Latest report:


Number of reports:


Latest report yes?


And a bonus one: here’s is_callable_now which I need to better understand how our call targetting works:

    {Do not call until} = BLANK(),
    {Do not call until} < NOW()
    {Next available to app flow} = BLANK(),
    {Next available to app flow} < NOW()
  {Phone number}


This is The Airtable formulas at the heart of everything by Simon Willison, posted on 23rd March 2021.

Part of series VaccinateCA internal blog

  1. New call queue ready to test. Also geography. - March 7, 2021, 5 p.m.
  2. APIs for importing locations - March 9, 2021, 5 p.m.
  3. VIAL is now live, plus django-sql-dashboard - March 15, 2021, 5 p.m.
  4. The Airtable formulas at the heart of everything - March 23, 2021, 5 p.m.
  5. VIAL: Preparing for some collaborative testing - April 1, 2021, 5 p.m.
  6. A CSV export, JSON import workflow for bulk updating our data - April 28, 2021, 5 p.m.

Next: Weeknotes: SpatiaLite 5, Datasette on Azure, more CDC vaccination history

Previous: Weeknotes: django-sql-dashboard widgets