Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

How to I programmatically add singe and multiple select fields

Topic Labels: API
2674 2
cancel
Showing results for 
Search instead for 
Did you mean: 

I’m using the Airtable api, and trying to update a record and add varous tags to an entry ( formatted as a multiple select field ). This is really a two part questions I guise. One, is it possible to create multipe choice entries, if they do not already exist as options ( dynamically create them ). Two, I can’t seem to even get it to work when I do add the options through the GUI. For instance right now im doing the following

            base('Companies').update(id, {
            "Categories": categories,
        }, function(err, record) {
            if (err) { console.error(err); return; }
            console.log(record.get('Company'));
        });

Where categories is an array of strings. What am I doing wrong ?

2 Replies 2

Today, it is not possible to modify a table’s schema via the API. So you cannot do actions like add columns or modify the values in a multiple select.

For the second part, your code looks okay to me. Can you share what your categories variable looks like and what error you are seeing?

Any update on that question ?
The only work around would be to create a table with categories and link the record … so it’s reinventing the wheel :frowning: