Updating rows with multi_contact cell?
Hello,
I'm using the Python API to update some rows as follows: copy cell values in specific columns from an old row, and append these to an update request as cells in the respective column for a new row.
This works for all but a contact column (with multi_contact enabled). I'm getting the error that I need to use ObjectValue instead of value, but I can't seem to build the objectValue manually, and copying the old_row.object_value into the new rows ObjectValue also doesn't work.
Does anyone know how to work around this? Thanks!
Best Answer
-
@nschum [EDITED] did some research and found a better answer, see code below. and also reference this thread: https://community.smartsheet.com/discussion/comment/185996/
Answers
-
Yes -- with Multi-select objects you need to include the 'objectValue' : 'VALUE' attribute. If you are 'copying' cell values that you extracted using an API get request, then you need to add: include=objectValue to the query to get objectValue's.
Reference: https://smartsheet-platform.github.io/api-docs/?python#cell-reference
-
Thanks coby - the problem is that when I pull the object_value.value attribute, I'm only returned with a string for the display value. The update request doesn't accept this as a valid objectValue to update the row with.
-
@nschum [EDITED] did some research and found a better answer, see code below. and also reference this thread: https://community.smartsheet.com/discussion/comment/185996/
-
@coby brilliant, that's worked. Thanks very much!!
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives