Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Groups, Table Views, and Formulas

karan Badhwar
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
karan Badhwar
Web Development Techdegree Graduate 18,135 Points

Formulas for Coda

How do we know which formulas and how to proceed with formulas like as Gill did (.status & . count) and what does dot( . ) mean in this lesson

1 Answer

Szymon Dabrowski
Szymon Dabrowski
2,207 Points

So the . before filter is so that Coda understands that we are initiating a command to run which is the filter command. Without the dot it would just be a normal word. Hope that makes sense.

For status I will try to break it down for you:

Note: By writing the table name coda will automatically allow us to select it.

  1. From the Learning plan table
  2. We are going to .filter() a specific part of the table
  3. Inside the () we write what we want to grab from the table. Which is to grab the status (bear in mind for status we are not adding a . because just like the table we are selecting something and it is not a command) and we want the status to be equal to "In Progress" as an example.
  4. The .count() is there to check how many lessons with the status "In Progress" there are.

So the purpose of writing that code in the video is to display how many lessons we have not started, started or finished. And shows an example of extra customization you can do in coda.