Essentially, it is working because it is doing the same thing as
.toText() does. This is because it is referencing an already stored text value within the row.
Here’s some further explanation
Notice that this here returns a blank value. Its not finding any matches. That is due to the fact that you are comparing two different data types. The data types of text and row value
In order to compare data as
= they need to be of the same type (number to number, text to text, row to row). This was the first issue we addressed.
The solution is to match your data values. There are two ways to do that.
Inefficient way - .toText(): This is inefficient because it is causing Coda to run another operation, the transformation of a value to another type. Notice though that it works, because it does return a value
Better way - Referencing an already stored text value. This is better because the value you are after is already stored in your document as text, no need to do an extra operation to transform it
The key to understanding this is in the row value type seen here
That value is unique in that inside of it is stored all the data from every column of that row. So you can take the Bob row and reference any of the data within the row using your dot operator
For example, I can find his age or color, or any other data in that column
Hopefully that helps! Let me know if you have any other questions!
Also - So @Paul_Danyliuk doesnt roast to me to smithereens I should also say when you are using
.first() to the end so you end up with a single value, not a list of one value