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