Create with null ID for lookup

Topic Labels: API
1592 0
Showing results for 
Search instead for 
Did you mean: 
5 - Automation Enthusiast
5 - Automation Enthusiast

I’m using the API to send my new Firebase entries (function) in Airtable but I’m having a problem. Some of these values are identfiants to add values from a Lookup (Allow linking to multiple records). But when adding some values can be null (it comes from checkbox) and then I have an error message like this: Value “” is not a valid record ID. Does anyone have an idea how to make Airtable understand not to consider if it’s null and just take those with a value?

Exemple :

function createAirtable(id) {
var t1 =;
var t2 =;
var t3 =;
var t4 =;

    "Date": xxxx,
    "Client": [id],
    "Heure": xxxx,
    "Etat": xxxx
    "Description": xxxx,
    "Info": xxxx,
    **"Véhicule": [t1, t2, t3, t4]** <== id for the lookup but some values will be empty

  }, function(err, record) {
    if (err) {

Thank you :grinning_face_with_sweat:

0 Replies 0