
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jun 02, 2022 01:28 AM
Hello, How do I pass function parameters as JSON field name for updating fields in Airtable using Airtable REST API and Node.js?
The code
const updateField = async (id, field_name, updateValue) => {
base('table_name').update([
{
"id": id,
"fields": {
field_name: updateValue
}
}
], function (err, records) {
if (err) {
console.error(err);
return;
}
});
}
Solved! Go to Solution.
1 Solution
Accepted Solutions

Solved
See Solution in Thread
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jun 02, 2022 06:45 AM
Reply
2 Replies 2

Solved
See Solution in Thread
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jun 02, 2022 06:45 AM
Is this what you need?
[field_name]: updateValue
Reply

Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jun 02, 2022 08:30 AM
Works!
Thank you for pointing out the silly mistake!
Reply
