Add row with multiple values in cell using c# sdk

edited 12/09/19 in API & Developers
11/05/18 Edited 12/09/19

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 = "[email protected]",

    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 ?

Popular Tags:

Comments

  • dAVE IndendAVE Inden Employee

    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": "[email protected]" }, { "objectType": "CONTACT", "email": "[email protected]" } ] } } ] }

     

    Did that get it working for you?

  • Ben GulerBen Guler ✭✭✭✭✭
    edited 07/09/19

    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.

  • dAVE IndendAVE Inden Employee

    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

Sign In or Register to comment.