Introducing formula chips

Hello Everyone,

Today we are launching another exciting improvement to make reading and writing formulas in Coda a little bit easier.

We have heard a lot of great feedback from our community that it can be hard to tell why a formula is not working as expected. Two of the most common issues we see are the result of comparing or using values of the wrong data type and picking objects from the wrong table.

We hope to improve these situations and many more with the introduction of formula chips.

Formula chips are stand alone tokens in a formula the are bound to an object in your Coda doc. An object could be any one of Coda’s primitives like a table, view, column, control, or row reference. A formula chip gives us a better surface to convey information about how Coda is interpreting the objects in your formula directly within the formula builder.

Starting today you can find three pieces of information encoded on formula chips. The first two pieces of information are conveyed using an icon that shows the object’s data type and if it is a single value or multiple values. The final bit of information is encoded in the color of the chip. All chips that come from the same source object will have the same color.

Some Examples

Now let’s take a look at how these changes help in practice.

In this example we are trying to figure out how many active deals we have with Dwight. Here we can see that our filter is probably never going to return any results because the Contact column in the Deals table is text and we are comparing it to the row reference for Dwight.

In this scenario we are trying to find out how many of our tasks are complete, but again our filter is not working as expected. We can see that the Status column is text, but the stacking of the chip icon tells us that it is a list of text values because we accidentally selected the entire Status column.

Now let’s try to add a column to our task tracker that shows the set of tasks in progress for a particular project. The color of the Status chip shows us that it is not from Tasks table, and that we picked the wrong Status column. In this case both tables are within view, so we can also see the chips are from different tables using the in app highlighting. In many cases we can’t rely on the in app highlighting because the tables are not immediately visible, and now with formula chip coloring they don’t need to be.

Quick type icon reference

Most of our data type icons should be familiar from our column formats, but just in case here is a quick reference.

If you ever aren’t sure what type an icon represents you can always click on a formula chip and the help text below will describe the data type of the object selected.

More to come

We hope that you find formula chips make a noticeable improvement in your ability to write and understand formulas in Coda. We would love to hear what you think!

We believe that formulas are one of key ingredients in connecting all of Coda’s building blocks together to build a cohesive app. With that said we plan to keep iterating and making more improvements in this space, so stay tuned!

Jason

28 Likes

This is great news - surely going to make some of my more complex formulas easier.

While we’re talking about formula usability, is there any chance that features like underlining closing parenthesis and the ability to format (indent/new line) formulas?

6 Likes

This will be a tremendous help. Thank you!

1 Like

Yes yes 1000x yes…

This is something I have wanted for some time now. Why not allow formatting characters inside formulas that are ignored with processing the formula? Particularly so we can have comments in our functions. Although I would argue against myself here and say that the best formulae are the ones where you can understand it without comments, I have written some large and complex functions that I fear having to come back to…

Thanks for the update to formulas, this is a very welcomed change.

Lloyd

2 Likes

One’s again a feature that I had no idea I needed but will be immensely useful. Keep up the good work Coda team!

1 Like

Thanks for the feedback. That is something we are thinking about and is on our radar.

3 Likes

Love it, especially the consistent visual distinction between Single and Multiple types - such a great idea!

That said, there’s an obvious question/enhancement raised by the examples provided: Both of them use the chips as clues to why these formulae aren’t working. How about having the evaluation UI report a helpful error instead of just returning zero? These type mismatch issues should be detectable at formula compile time.

Don’t get me wrong, I still think the chips are a great addition: they make most interactions with formulae better, not just debugging. However, what would be even better is something like this:

Please forgive me if you’re already working on something like this! I’m just copying what I’ve seen while programming in the Elm language, which gives the most helpful errors I’ve ever seen from a compiler; take a look at the Compiler Errors For Humans blog post for their design philosophy.

3 Likes

Thanks for the feedback @Yoz_Grahame. This is something we have been thinking about and will hopefully have a solution for in the near future.

3 Likes

Definitely one of my favorite new features, since all the coding I do in Coda is completely experimental and fail-oriented. Thanks guys! :smile_cat: