Compare an @Reference to it's Row Value

Hi All,

I’ve been stumped on this one. Anyone have any idea???

image

The goal is to transform an @Reference so it will match thisRow.

Thanks,

Shaun

@Shaun_McLean1

@ref in a cell differs from =@ref in a cell.

It’s easiest to see examples. Review the formulas in this doc.

Hey @Shaun_McLean1, welcome to the Community!

Both the “bubble” and the “@-reference” are row references. The key difference is that:

  • The bubble is how Coda displays a row reference on its own or in a list.
  • The @-reference is how Coda displays it within a rich text.

So, the left one is a reference on its own (and don’t let the Text column type fool you — the Text column type works as “any type” in Coda and does not convert items to text, but rather will try to auto-guess the type and render that). And the right one is a single line of text with a span that resolves to a row reference.

That’s why the two (the reference and the formatted text with a reference as its only content) are not equal.

I don’t have a ready solution to extract a row reference from the rich text column (although I believe it’s possible). What you can do instead is the opposite — construct the rich text that would equal to the text on the right. To do this, simply:

Concatenate(thisRow)

and you’ll get the same text that you’ll be able to compare to AtRow on the right.
image

2 Likes

@Shaun_McLean1

What’s your use case for this?

@Paul_Danyliuk

I’ve never had the need to convert a row reference to a rich text @ref. And now I wonder if I’m missing out on something!

Do you use design patterns that rely on this? Examples?

I’m also thinking that it’s a strange use case — instead of typing in the @ reference I’d just say make it a lookup column and select the row from there.

I just forgot to write it in my previous post :slight_smile:

1 Like

Something like a List@Refs() formula could be fun:

[richTextColumn].List@Refs() -> Makes a list of @refs found in a unit of rich text.

“Lorem @red ipsum @blue dolor @yellow end.” -> [red, blue, yellow]

You were asking for it, weren’t you :slight_smile:

Let this be an illustration to what I explained earlier (refs vs rich text with refs) :slight_smile:

3 Likes

Thank you for this impressive illustration! :mage:

I hardly ever use @refs in rich text because nothing can be done with them other than accessing their row modal (which can be useful). But functionality like this would enable utilizing the structured data value of @refs even when they exist in text blobs.

It would open up a world of possibilities.

Ander,

That’s exactly how I’m using it. I’m glad someone else can see the value.

Paul,

You truly are a champion. Thank you. Quite frankly, the initial solution you provided with Concatenate(thisRow) worked well enough :D.

Thanks!

2 Likes