If you are going to spend learning and extensively using one formula in Coda the filter() formula is the one you want to know. It helps you get actionable insight on your data, summarize information in lookup columns, and oh so much more.
But be careful! With great power comes great responsibility. As your docs grow, filter() formulas can be big drainers on document performance. Learn more how to use it below!
First - let’s just learn how it works.
The filter() formula is like saying:
Hey Coda, can you go look into this table and give me all the rows that match a specific criteria? In the following examples, we are going to take a look at the table and find specific information from it
All people over 79 years old
@Andrea White
@Valerie Frank
@Matthew Mccoy
@Crystal Lamb
@Jeremy Stafford
@Ryan Yates
@Victoria Lopez
@Loretta Curtis
@Mark Watson
@Kelli Mcintosh
@Shawn Torres
@John Wilson
@Kathy Allen
All people with a salary < 20,000
allPeople.filter(annual salary > 20000)
@Daniel Ruiz
@Michele Matthews
@Michael Cline
@John Sullivan
@Renee Lamb
@Kelly Ayala
@Jerome Walker
@Kristin Lewis
@Kimberly Boyd
@Daniel Wheeler
@Katherine Summers
@Laura Torres
@Stephanie Hernandez
All people who’s name starts with “N”
allPeople.filter(name.startsWith("N")
@Nicolas Jones
@Nathan Garcia
@Nancy Mendoza
@Natalie Yu
@Nicole Johnson
@Nicole Rice
@Natalie Bailey
@Natalie Edwards
@Nancy Andrade
@Nathan Heath
@Nancy Johnson
@Nicole Hines
@Nina Morgan
@Nicole Mason
@Nancy Aguilar
You can also use it to return rows that match multiple criteria
All people with a birthday in May and who are over 67
allPeople.Filter(Birthday.Month()=5 and Age>67)
@Jessica Hawkins
@Melissa Garcia
@Carl Harper
@Denise Martin
@Elizabeth Chandler
@Thomas Freeman
@Brandon Long
@Lauren Kennedy
@Steven Hill
Now - let’s learn how to use it to really unlock some Coda magic
The filter() formula is really shines when used to summarize or lookup information from another table. For example, take these two tables below and their tasks - all the task information you see in the yellow columns is thanks to our filter() formula!
These are really powerful because then you can see all of you project information in one place! The filter() formula is how you begin to connect your tables and relate your information
Last - let’s learn how to optimize it
No need to reinvent the wheel here! Coda has written a wonderful blog on it and you can find that at the link below