smartsheet API Update PICKLIST column error

1.3k Views Asked by At

I am getting an error using the Smartsheet API to update a row in a smartsheet document. Previously this has been working, so I think something may have changed recently in the smartsheet api that is causing this error, but I couldn't find any smartsheet documentation to support that. The error is: Error Code: 1235 - Value is not supported for this column type. Use objectValue instead. Ref ID: <refIdHere>

According to the Smartsheet API documentation, the objectValue is used for MULTI_PICKLIST. I am not using any MULTI_PICKLIST in my smartsheet, just using a PICKLIST, DATE, CHECKBOX, TEXT_NUMBER.

What is the correct format to send to PUT https://api.smartsheet.com/2.0/sheets/sheetid/rows ? Here is the format that I have been using, which was working until a few weeks ago. It didn't matter if the columns were PICKLIST, DATE, CHECKBOX or TEXT_NUMBER, this format was working. Now it is failing when updating a PICKLIST column. Also, what does the RefId reference?

    "id": "<sheetId>",
    "cells": [{
        "columnId": 4714233383413635,
        "value": 123456
    }, {
        "columnId": 5840133290256265,
        "value": "Africa"
    }, {
        "columnId": 5277183336834945,
        "value": "French"
    }, {
        "columnId": 8654883057362825,
        "value": "2020-09-04"
    }]
}]```
2

There are 2 best solutions below

0
On

There have been no changes to the API that would break behavior. It is possible the column type in your sheet was changed? I would double check the types of your columns to be sure.

value is a legacy format that still exists to preserve backwards compatibility with existing systems. It is strongly recommended you use objectValue, which for strings and numbers, behaves exactly the same way as value.

For example:

"objectValue": 123456
0
On

add "strict": false to cell:

"cells": [{
  "columnId": 4714233383413635,
  "value": 123456,
  "strict": false
}