I was a bit annoyed that I couldn’t show you those visuals cues in my previous reply so I prepared a small sample (which you’ll find below ) and took some screenshots while building it …
But, of course, I couldn’t get back here earlier …
In the sample, you’ll find 4 Filter()
formulas on the canvas and their result… and a small table simply used to store some datas I could filter …
When you write a formula, as you’ve probably seen this yourself, Coda always let you preview the result you’re going to get… But it also tells you what type of data that result actually is by showing you a very small icon at the far right of the result …
You can always hover the icon with your mouse if you have a doubt about its signification .
So, here’s a screenshot of my 1st Filter()
formula …
I’m just looking for a row where the value in my field Order
= 1
.
But what I get without using First()
, as shown by the small icon, is a list of rows … and as there’s only one row in my table where Order = 1
, my result is in fact a list of one row
Now, in my 2nd Filter()
formula, I used the same exact formula but added .First()
to finally get the row I was looking for in the first place …
Look at how the small icon changed : In the previous screenshot, it looked “multiplied” but here, it’s a simple “row icon”
As you were trying to get a date, I did so too in my 3rd and 4th Filter()
formulas.
In the 3rd one, I didn’t use First()
and here, I got even more visual cues …
The one standing at the far right of the result, like previously… but also within the formula… as Coda also tells you what is this data type of what you use in the formula with icons… And if you click on it, the formula editor will give you more info about it. Which is what I did here by simply clicking on Date
where the icon seems “multiplied” too
And last but not least, here’s the 4th Filter()
formula where I used First()
to isolate the appropriate row from the list of one row I was getting to actually access the date in that row .
The icons also changed here going from a “multiplied” calendar to a simple one .
That’s it !
I know those icons are not always that visible but they’re really useful …
(Note that the sample will probably look a little bit better if opened in his own tab’ )