Oct 31, 2016 11:07 AM
I’m writing a simple resource management application, where staffers enter for each month the percent of their time they spend on various projects. I store those allocations as "percent’ fields in an Airtable table.
I collect inputs for these from a node.js web page, and want to update the allocations in the database.
When I pass the values to the update() function, I see the following:
error: ‘INVALID_VALUE_FOR_COLUMN’,
message: ‘Field May 17 can not accept value 15’,
I suspect that the system is seeing string values instead of the required number values, but don’t know how to deliver the correct format from JS.
I’ve tried the value with and without quotes, and also tried submitting parseInt(value).
Note: I’m also using eval() to generate the update() command, as my function handles the update field names as variables, which also seem to be a problem
// build the update string
var updatestr = "base(\'allocations\').update(\'" + request.body[i].allocid + "\', {";
updatestr += "\"" + request.body[i].month + "\":[" + request.body[i].pct + "]";
updatestr += "}, function(err, record) { \
if (err) { console.log(err); return; }\
console.log(record);\
});";
console.log(updatestr);
eval (updatestr);
Oct 31, 2016 11:12 AM
Please disregard the above. Turns out to be my error, not the API. Apologies for that.
Jan 10, 2018 09:30 PM
What did you end up doing to fix this? I’m getting the same error.
Jan 16, 2018 01:32 PM
I also work with airtable on many projects.
Sometime i have this error for numeric values, i fixed it by setting field type to “Single line text”.
Mar 08, 2018 10:45 AM
Can you please tell me how did you solved it? Thanks