How to write to a Smartsheet column with dropdown list column type and with restricted selection.
I am encountering an error while attempting to input data into a Smartsheet column characterized by a dropdown list column type that enforces restricted selection from a predefined list. The error message is as follows: {"response": {"statusCode": 400, "reason": "Bad Request", "content": {"detail": {"index": 0, "rowId": 3268859086792580}, "errorCode": 1235, "message": "Value is not supported for this column type. Use objectValue instead.", "refId": "cj7h6"}}}
I tried the below function to write to that column:
def add_value_to_cell(column_map, value, column_name, ss_client):
new_cell = ss_client.models.Cell()
new_cell.column_id = column_map[column_name]
new_cell.object_value = value # Use object_value instead of value
new_cell.strict = True # Set strict to True for dropdown list columns
return new_cell
Answers
-
What kind of column is it?
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives