Help

Linking one record to 100 records on an other table

3903 5
cancel
Showing results for 
Search instead for 
Did you mean: 
Casimir_de_Haut
4 - Data Explorer
4 - Data Explorer

Hello AirTable team,

I’m using airtable to do some product pricing with complex formula and links between tables.

I’m having an issue with linking tables and more specifically linking one to multiple records (i have been able to link them one by one by hand but i need to do mode than 5000 (50*100records) linking which is a hustle to do by hand) ) .

As an exemple :

I have 2 bases, the first (table1) with price references ( resale value) of each car and the second one (table 2) with complex formulas that let us update price based on the state of the car (second hand, engine, accessories …)

The first base (table1) is updated through the API straight from our website , and the second one (table2) is linked to our price estimation tool. But when i update the price reference on table 1, I want it to update automatically the 100 records on table 2.

To resume:

When I update a record on table 1, I want it to automatically update 100 records on table 2 (taking info from the record on table 1) without having to link records one by one (by hand).

Thanks a lot.
Casimir

5 Replies 5
BenInDallas
7 - App Architect
7 - App Architect

Maybe I’m missing something, but it sounds like all you need is a LookUp Field. Add a lookup field to Table 2, selecting the “price” field from Table 1 as the data source. Does that help?

Malo_Richard
4 - Data Explorer
4 - Data Explorer

Hello @BenInDallas, it is Casimir (i’am on my collegue laptop).
Thanks for the reply,
I do use the LookUp fields but you can’t copy and paste in the cell all the ids I wan’t to link (around 100 for each).
The only way to do it, is by clicking the + button and select them one by one
Capture d’écran 2017-04-19 à 17.59.10.png

The lookUp fields work perfectly but I cant be ask to clic on this button over 5000 times to set up all of them which would take forever.

I have been checking with the api, I found a way to do what i wanted but as the api is limited to 5 request per second it would also take quite some time.

I would be so much easier if you could select multiple entries or a group or a filter when you clic on the + sign.

Hello again, after a good night of sleep I found out a way to do it with the api so I don’t have to clic 5000 times #hurrah

I put my little code just below for people in the future facing the same problem,
You just have to pass all ids in an array to the link field and it will work.

    base(`your_base`).update('Id_of_LinkedField', {
    "Name_of_RollupField":  ["id1",
            "id2",
            "id3",
            "id4",
             "id...."
            ],
    "updated": moment()
  }, function(err, record) {
      if (err) { console.error(err); return; }
      console.log('yo it worked yeah!!!');
  });
Sage_Schlebach
4 - Data Explorer
4 - Data Explorer

Hey Malo,

I am having the same exact uber frustration trying to connect multiple ‘sku’ to a single order number in a second base. If this code works out that would be an enormous time saver for me :slightly_smiling_face: I was just wondering where exactly would you put such a code because I couldn’t see a script functionality or VBA like feature in airtable?

Any help on elaborating your solve would be so appreciated!

M_k
11 - Venus
11 - Venus

Hi @Sage_Schlebach

You might want to put this symbol in front of Malo @, so that they will get your reply directly.

Mary K