I’m certain this is a lack of understanding of JS or synchronous/asynchronous operations on my part, but: if I want to call Airtable.base.create
through the Node.js module and actually get the created records (or error) returned to be used elsewhere, how would I do that?
Currently, my code looks like this:
export async function createRecord(record) {
base('example').create({
"field": recordr"field"]
}, function(err, record) {
if (err) {
console.error(err);
return;
}
console.log(record.getId());
});
}
I can get the information logged to console just fine, but I’m not clear on how to properly return it or assign it to a variable and use it elsewhere.