Help

Re: How to create new record in Link-to column with value (instead of record-ID)

4172 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Gino_Belvedere
5 - Automation Enthusiast
5 - Automation Enthusiast

I am trying to create new records via airtable.js,

when I try to create a new record in Link-to column with row-value (i.e. name - string not Record ID),
it does not work and reply

Class {error: “INVALID_RECORD_ID”, message: “Value “VALUE” is not a valid record ID.”, statusCode: 422}

Is there any way to avoid this condition?

or there is not “typecast” command in airtable.js ? if yes, please let me know some example,

var dataCompt = {
    "field1": "value1(text)",
    "field2(Link-to column)": "value2(text)" 
};

function createATData(){

base(tableName).create(dataCompt, function(err, record) {
    if (err) { console.log(err); return; }
    //loadArtists();
});

}

11 Replies 11
djaiko
4 - Data Explorer
4 - Data Explorer

Lacking this feature renders AirTable automation useless for our business. Can anyone from AirTable comment on a workaround that doesn’t require API calls? We will bump up against the rate limit otherwise.

nathan
4 - Data Explorer
4 - Data Explorer

I’ve found similar requests for this dating back to 2016. I’m shocked that this is still a problem nearly 2 years later.

I can’t seem to (easily) get a list of the record Ids to associate with values. This prevents me from even hard-coding a lookup table to work around this problem. I don’t want to make multiple API requests because we run the risk of getting rate limited and, even if I used AirTable’s JS library automatic retry on 429 responses, I have to pay Amazon for the wait time (I’m using AWS Lambda + API Gateway to catch Shopify web hooks and transform them for insertion into AirTable).

Maybe I’m missing something obvious (I really hope that I am), but this is a deal breaker for us. I’m evaluating other platforms where this isn’t an issue because the original poster hasn’t had a response in 2 months and it’s not on AirTable’s API roadmap which is still at the initial v0.1 release.

EDIT: Adding a new column with a RECORD_ID() formula exposes enough information that I can create a hard-coded lookup table, but it’s still a hackey workaround.

Michael_Horwitz
5 - Automation Enthusiast
5 - Automation Enthusiast

Any progress on this?

We need to link our free trial sign ups to existing accounts. When they sign up they enter their Organization name. If we could link based on a passed in value then we could simply enter the name they supply to the linked record table and all our other tables would be linked in via that initial link.

Currently this would need to be done manually and will probably prevent us from adopting AirTable as our CRM.

openside
10 - Mercury
10 - Mercury

If your using the API to insert from your lead capture form you can insert into the link field using the name. If it’s an exact match it will link it. If not it will create a new record in the linked table. This would also work using a service like zapier.

If it’s something you wanted to hire out we could help.

Thanks @openside, I am using Zapier but I need to upgrade to the paid account for multi step zaps. First we need to do a search if records already exists and then create or update records. The search formula seems to be pretty powerful. I wonder if there is a way to allow inexact matchs.

Brian_Dreyer
4 - Data Explorer
4 - Data Explorer

Any new thoughts or updates on this topic? I’ve run up against this limitation as well.

Trevor_Goss
4 - Data Explorer
4 - Data Explorer

Curious if there are any updates on this?

I’ve used Zapier to send form data from a webflow form directly into airtable fields that are linked to other tables. This allows a calculation to be run, and the method has worked perfectly for years.

But I’m now build an app on Bubble and trying to do the same thing with form data being passed to Parabola, and sent to Airtable via API Export. It is returning the dreaded 422 Error

{
“error”: {
“message”: “Value “xyz data” is not a valid record ID.”,
“type”: “INVALID_RECORD_ID”
}
}

My suspicion is you have to have the actual record ID (i.e. the rec8116cdd76088af type vs the human readable version “form field input value”). But, that’s somewhat confusing because passing the human readable value directly from form inputs to Airtable works perfectly well when done via Zapier. If anyone else has any wisdom on why the direct API approach doesn’t seem to work this way, I’d appreciate it. In my use case, there are approximately 50 different linked tables with other data on them, so doing a bunch of joins would be a large undertaking.

Hi @Trevor_Goss did you find a way to add a record toa linked table via the API? I’m facing the exact same problem.

Same here. Works great with Zapier but not Parabola. Any idea’s