Lookup - What am I doing wrong?

What am I not understanding? I just can’t figure out Lookups
Is my formula not copied, exactly as the Coda Doc?


Removed Columns

So whats going on is you are trying to compare two different data types - A row value (as seen in your thisRow tag) and number values (as seen in your tag table3.tagld tag).

You need to compare like values - try adding a .tagID to the end of thisRow in your lookup formula.
Lookup(tag table 3, Tag Table 3.tagId, thisRow.tagId)

Or write it like this:
Tag Table.filter(Tagid = thisRow.tagId)

Personally I prefer the filter() formula!

2 Likes

Wait, regardless of either formula (filter or lookup), a second lookup is the only way to return a different column?
and :heart: for the thisrow.xxx info.

Yes and no. If you are only going to pull one columns data then you can rewrite your formula as such:
Color Table.filter(tagId=thisRow.Name2).Color

The dot operator at the end of the parenthesis of the filter formula can do lots of things. With it you can pull/reference any columns data, or use other formulas like the following to gather info:

* .count()
* .unique()
* .bulletedList()

But if you will reference more than one columns information or do anything else with the data from that lookup its best practice to write it as you have: One lookup column, and then reference that lookup column in new columns to pull out/summarize data.

In large documents, filter formulas (dependent on how they are written) can begin slowing your document down. Therefore having one column written to pull the correct lookup data and then referencing it in other columns is best.

Heres a great article on filter formulas!

1 Like