Automation Assistance - Linked Records

Hi I am trying to build an automation. When a record enters a view, I want to update another table for the linked record. For example:
In Table A there is linked record to Table B. In Table A there is a field Field A. When a record enters a view in Table A, I would like to update Field B in Table B for the linked record with the data in Field A. I think I need to run a script to get the record id for the linked record because you can’t select a linked record as the Record ID in the Update Record function in an automation. I tried to just ‘Lookup’ the record ID of the linked record, but this does not seek to work either. I could use some help to get the record id of the linked record.

Thoughts/assistance?

This wont get you all the way there, but you can use a FORMULA of the linked record ID.

Table A has a field “recordID” which is the following formula:
RECORDID()

Table B is linked to records in Table A.

  • Table B has a field “linkedRecordID” that performs a Lookup of “recordID” from Table A

  • Table B has another field “linkedRecordIDString” which is the following formula

    linkedRecordID

Now you can use the field linkedRecordIDString in your automation. I hope that makes sense.

In all truth, the automations really restrict what you can use, but provide for wonky workarounds. I hope Airtable just makes these other fields easier to work with.

The value of a Record Link field is returned as an array of objects (even if only one record is linked):

[
    {id: 'recXXXXX', name: 'Record A'}, 
    {id: 'recYYYYY', name: 'Record B'}
]

So if you want the record IDs out of that array you could do: (assuming you’ve already defined values to be the value of the intended field)

let ids = values.map(x => x.id)

If you want a singular ID, assuming that ID is the first in the array:
let id = ids[0]

2 Likes