Help

Re: How to I programmatically add singe and multiple select fields

980 0
cancel
Showing results for 
Search instead for 
Did you mean: 
E_S
4 - Data Explorer
4 - Data Explorer

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
Giovanni_Briggs
6 - Interface Innovator
6 - Interface Innovator

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?

Jean-Philippe_E
7 - App Architect
7 - App Architect

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: