Skip to main content
Solved

Get record name instead of id - via API using Python

  • October 19, 2021
  • 2 replies
  • 208 views

Forum|alt.badge.img+13

I’m using Python API Wrapper.

When I use get() method to retrieve a record that contains a ‘Link to Another Field’ Column, the method returns the linked record ID. I would like to get the linked record name instead. My next step will be to do a 2nd operation to look up each record (by id) and get the name. But I wonder if there is an easier way that I’m overlooking.

If not, any recommendations about an efficient way to do this with Python / Pandas would be appreciated.

Best answer by Dimitris_Goudis

Hi @Matt_Kennedy1,

I think this is because Airtable into “link to” fields stores the record id even if we see the data.
What I recommend is to create a formula field that with ArrayJoin({linked to filed}) function inside. This will convert it to text so you can request this field with get() function.

Does it work for you?

Thanks

View original
This topic has been closed for replies.

2 replies

Dimitris_Goudis
Forum|alt.badge.img+20

Hi @Matt_Kennedy1,

I think this is because Airtable into “link to” fields stores the record id even if we see the data.
What I recommend is to create a formula field that with ArrayJoin({linked to filed}) function inside. This will convert it to text so you can request this field with get() function.

Does it work for you?

Thanks


Forum|alt.badge.img+13
  • Author
  • Known Participant
  • October 24, 2021

Hi @Matt_Kennedy1,

I think this is because Airtable into “link to” fields stores the record id even if we see the data.
What I recommend is to create a formula field that with ArrayJoin({linked to filed}) function inside. This will convert it to text so you can request this field with get() function.

Does it work for you?

Thanks


Yes - this works. I was hoping to avoid adding the extra fields for all the tables I’m working with, but it isn’t too bad so far. Thanks!