Editing/Updating ContactList or Dropdown Items via the API

Hi guys.

We are making good headway pushing data from our CRM to SS with the API with VB and C#.

One of our sheets needs to have a column with a list of (regularly changing) people for the users to select from in a ContactList or Dropdown control. I believe it is not possible to draw these lists from another source sheet for these controls as yet.

This list of people is automatically kept up to date on our SQL server for use locally, so I want to be able to push the updated values/list (clear and rebuild the list), into the actual list of available people in the SS sheet control, for the users to pick from manually.

I am not talking about pushing/selecting values in the cell with the API, but updating the possible selections for the users to pick from.

Is this possible?

If so, any clues please?

Thx.

Best Answer

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓

    Hi @Jeff Davies

    You can update the Contact options in the dropdown list by using Update Column and setting the contactOptions in the column object.

    The value for the contactOptions property must be an array of objects, where the objects are formatted as follows;

    { email: emailAddress, name: name}

    Setting this will wipe out the current values, so if you are looking to add new Contacts then you will want to provide a whole new list, including the new values.

    Here's the API Documentation for Update Column: https://smartsheet.redoc.ly/#operation/column-updateColumn

    Cheers!

    Genevieve

Answers

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓

    Hi @Jeff Davies

    You can update the Contact options in the dropdown list by using Update Column and setting the contactOptions in the column object.

    The value for the contactOptions property must be an array of objects, where the objects are formatted as follows;

    { email: emailAddress, name: name}

    Setting this will wipe out the current values, so if you are looking to add new Contacts then you will want to provide a whole new list, including the new values.

    Here's the API Documentation for Update Column: https://smartsheet.redoc.ly/#operation/column-updateColumn

    Cheers!

    Genevieve

  • Jeff Davies
    edited 05/05/22

    Fantastic @Genevieve P. !

    Really appreciate the guidance.

    That will save me plenty of time.

    Thanks again. : -)

  • @Genevieve P.

    I have this working successfully now.😎

    Getting the hang of things now.

    Thank you once again. 👍

  • Genevieve P.
    Genevieve P. Employee Admin

    No problem! I'm glad you got it working 😎