How to insert a value for Contact List Column from c# using api

Hi all,

I need to insert a value for a column, whose type is column list, from c# using api. I have even tried by defining the value and display value for this column from c#, but it does'nt get reflected on sheet.

Thanks!

Shoaib

Answers

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @Shoaib Sidsync

    Do you have multiple contacts allowed in this column? Multi Contact columns are a newer column type, so they require the use of the objectValue attribute. (See: https://smartsheet-platform.github.io/api-docs/?csharp#objectvalue-object)

    Let me know if that's helped!

    Cheers,

    Genevieve

  • lkrobot
    lkrobot ✭✭✭

    Hi,

    i have more or less the same question (i'm using python):

    the column type is CONTACT_LIST (single value only, not multiple values) ...

    here is the code snippet:

    case_owner_email = "owner.name@company.com"

    new_row.cells.append({

    'column_id': project_metadata_column_map["Case Owner"],

    'value': case_owner_email

    })

    all my email addresses are correct, and all my owners are registered users in Smartsheet, but sometimes, when i open the sheet, i get correct user (pic + name), but other times i get only email address ...

    i need that this is always user ...

    so, is there any specific formatting for the value ?

    thx & rgrds,

    ljk

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @lkrobot

    It looks like you've posted this in two other places (here and here). I've answered you on one of the other posts, but it sounds like in your instance you should be adding the displayValue property to resolve your issue.

    Cheers,

    Genevieve