Help

Re: Syncing linked record fields from one base to another while maintaining relationships

3389 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Ronen_Babayoff
7 - App Architect
7 - App Architect

Hey there,

Assume a contact management base where we have a Contacts Table and a Companies table.

The Companies table has a Company Contacts linked record field that lists all contacts in that company.

When syncing both tables to another base, the Company Contacts linked record in the target base is displayed as a text field, not a linked record field and looses the linking between records.

Any plans for airtable to maintain the connection between linked records when both tables are synced to the same base?

When trying to recreate the link using a new linked record field and a script, I found out that the getCellValue method only returns the linked record name, and does not return the linked record id.

Any plans for the airtable scripts and blocks apis to return the record IDs of synced linked records, not only text?

My workaround, for now, will be to:

  1. Add to both source tables a formula field that return the RECORD_ID().

  2. Add a lookup field to the Companies table that displays the contact record ids

  3. In the target base, use the synced record id fields in an automation to recreate the linked records in a new Company Contacts linked record field.

Anyone with a better solution?

Thanks,
Ronen

4 Replies 4
Oscar_Mastrober
6 - Interface Innovator
6 - Interface Innovator

Hi @Ronen_Babayoff , were you able to make this work? Thanks!

Ian_Gillis
4 - Data Explorer
4 - Data Explorer

Thank you, your workaround is working quite well for me! Though I would obviously also like to have this available out of the box.

Although I didn’t have to create a new formula field to return the record ID – it was selectable already in the Automation dropdown.

Jessica_Eastlin
5 - Automation Enthusiast
5 - Automation Enthusiast

Would you be able to share how you did this with a little more detail built into the steps 1-3 you laid out please? I’m having a little of a hard time following and would love to use your method!

Thanks :slightly_smiling_face:

Drew_Schumacher
5 - Automation Enthusiast
5 - Automation Enthusiast

Some additional details on this, that I have learned from my own struggles.

The above solution doesn't work in all circumstances (depending on uniqueness of records and the type of the relationship (many to many vs one to many). 

If you lay out a 3 by 3 matrix of uniqueness and relationship type...

There are 3 ways to link things up:

  • Name/Primary Field
    • via constraining the destination field to a linked record
    • via automation
  • Original record ID
    • via automation

Some of these solutions only work from a certain direction (aka from the many side of one to many, or from the side that has duplicates if one of the tables is unique in its primary field.

Here is the table:

Screenshot 2023-02-25 162040.png

 The reason you can't use ID in all circumstances is because airtable automations do not have a way to iterate through multiple commands for the same record entering the automation (which is needed for many to many link).  You can do this with integromat, but that is more complex.

Also, constraining synced fields backed to linked fields seems to have some interesting consequences.

They really just need to enable linked fields being synced (if you are syncing both sides of the relationship).

I have been looking for help on one of those circumstance here:  Recreate synced many-to-many table links based on csv text field of original record ids.