Hi, would anybody know how to pass the second variable (airtableField) in below function? The third variable (shopifyId) is accepted! The purpose is to return just 1 record.
Thanks in advance, Ronald
let shopifyId = '2418417139848'
checkAirtableId('Orders','Order id',shopifyId)
function checkAirtableId(airtableBase,airtableField,shopifyId) {
let recordFound = base(airtableBase).select({
filterByFormula: `${airtableField} = ${shopifyId}`
}).firstPage(function(err,records) {
if(err) {
console.log(err);
return;
}
return records[0]
})
}