IF statement returning record as string and not as a link

Hi all–

So I’m using

`IF({END DATE},BLANK(),Assignee)’

The Assignee is a column on this table that contains a link to a record from a table for personnel data. However, when it displays the data, it displays the name of the assignee as a string, rather than as a link. Is there any way to make it display as a link to the record of the person from the personnel table?

THANKS JEREMY for leading me here.

*Taj

Unfortunately, there’s no way to return a linked record field using a formula; it will always be a string.

It’s not a great solution, but you could encode an actual URL that links to the Assignee table by using lookups to get the corresponding record ID. Add a formula field to the Assignee table with the formula:

RECORD_ID()

Let’s say you call it {Assignee Record ID}, then, use a lookup field to pull {Assignee Record ID} to your current table, and use a formula like this…

IF({END DATE}, BLANK(), "https://airtable.com/tableidhere/" & {Assignee Record ID})

Replace “tableidhere” with the table ID from the Assignee table.

If you don’t know how to find the table ID, go to any record on the Assignee table, right click and choose “Copy Record URL”, then paste it somewhere. The table id will start with “tbl”. You may also have particular views set-up, in which case you can use the view ID in your formula as well (that will start with “viw”).

All of that being said; depending on your use case this might not be helpful. The URL will only work for those who have access to the base. If you’re sharing the base with outside users, you’d need to work in the shared link to your formula.

2 Likes

Two observations…

  • Table IDs should be accessible through functions.
  • Table IDs should be accessible through the API.

One might also make a good case for programmatic access to base IDs as well.

2 Likes

Agreed! This would be a nice feature to have!

1 Like

Awesome. It works! <3