Help

Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Invalid Value for Column Error for a Duration Field

Topic Labels: API
1428 1
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi,

I am having some trouble with a Patch request to update a Duration field.

The error I’m getting is this:

{error: {type: "INVALID_VALUE_FOR_COLUMN", message: "Field Time Spent can not accept value 5306"}}

But what’s interesting is, if I change the field type to “Single line text,” it works fine and updates the field as expected.

Here’s how my header looks in both cases:

header

Am I formatting the value wrong for the ‘Duration’ field type? I tried converting 5306 seconds to “01:28:20” string but I got the same error.

Any thoughts?

Thanks,
Roosevelt

1 Reply 1

Perhaps you are passing the data as a string i.e adding quotes to your value(in this case 5306), and as a result the API thinks you are passing a string…
That is why it is working when you change the field type to “Single line text”.

To correctly pass the data it would be something like

“Time Spent”: 5306