Skip to main content

Invalid Value for Column Error for a Duration Field

  • July 2, 2018
  • 1 reply
  • 1 view

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:

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

Forum|alt.badge.img+3
  • Participating Frequently
  • 586 replies
  • July 5, 2018

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


Reply