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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives