Add row with multiple values in cell using c# sdk
One of columns has 'Contact List' type with checked 'Allow multiple contacts per cell' see example.
I tried to add row using smartsheet-csharp-sdk(v2.3). Cell object:
new Cell {
ColumnId = 111111,
Value = "Test@test.com",
Strict = false
}
and I got the next error:
{
"errorCode": 1235,
"message": "Value is not supported for this column type. Use objectValue instead.",
"refId": "163zew9slvgfq",
"detail": { "index": 0 }
}
Then I tried to find how to pass ObjectValue and found only how pass 'Predecessor List', but nothing about multi 'Contact List'.
Question: How to add multi contact list cell using C# SDK ?
Comments
-
It looks like you answered this same question on StackOverflow under the smartsheet-api tag here.
I see that one of our Developer Advocates, Scott McAllister, reached out and let you know the C# SDK doesn't support working with multi-contact columns yet. Instead you can send a native HTTP request to make a PUT request with a body like this:
{ "cells": [ { "columnId": 6654716978456452, "objectValue": { "objectType": "MULTI_CONTACT", "values": [ { "objectType": "CONTACT", "email": "user1.email@smartsheet.com" }, { "objectType": "CONTACT", "email": "user2.mail@smartsheet.com" } ] } } ] }
Did that get it working for you?
-
Is there an anticipated C# SDK update that will include support for multi-contact columns?
The issue we are coming across is that while other column types are detected, we cannot find out which columns in a sheet are multi-contact. The column type for multi-contact returned is "ColumnType.TEXT_NUMBER". There is a "ColumnType.MULTI_CONTACT_LIST" in the SDK but it is not returned from actual columns that have this data type. (The "ColumnType.CONTACT_LIST" works properly). If the multi-columns can be "detected", then circumventing the SDK using the "Passthrough Option" with an HTTP call could work.
We hope for an update that would allow us to include this wonderful multi-contact feature in our workflow.
-
There is support for multi-contact columns as of version 2.4.0 of the C# SDK. It is noted as support for Multi-Assign which uses the MULTI_CONTACT_LIST column type. By default the sheet data displays a multi-contact column as a TEXT_NUMBER type. TO get the MULTI_CONTACT_LIST type and to see the multi-contact data in the JSON you need to add some additional parameters. For a GET Sheet request there is a level parameter that you can pass. Setting that to a value of 1 along with setting the includes parameter with objectValue will show the column as have a MULTI_CONTACT_LIST type and the multi-contact data will be in the cell object.
-
Even though leveling up, and including Object value the .NEt SDK fails to popoulate the Contact object
-
Yes, I have run into this as well. It's been 4 years. I don't think they plan on updating this anytime soon. Not sure why'd they create these column types and then not support them at all.
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.9K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 302 Events
- 33 Webinars
- 7.3K Forum Archives