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
-
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
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Answers
-
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
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Fantastic @Genevieve P. !
Really appreciate the guidance.
That will save me plenty of time.
Thanks again. : -)
-
I have this working successfully now.😎
Getting the hang of things now.
Thank you once again. 👍
-
No problem! I'm glad you got it working 😎
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
I want to update a dropdown list column which contains "employee status" and also that column contains conditional formatting.
How to do it via API Method
Thanks,
Sandhiya P
-
Hey @Sandhiya07
Here's the updated link to the newer version of the API Documentation for Updating a Column: https://smartsheet.redoc.ly/tag/columns/#operation/column-updateColumn
The request examples in the right panel show how to update a Picklist column with new values.
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
I have tried using this API method, but it looks like there is only a limit of 1000 contacts. I keep on encountering this error:
"errorCode" : 1061,
"message" : "Max count exceeded for field 'column.contactOptions[]'."
Is there a work around for having 1000+ contacts??
Thanks,
Aaron
-
Hey @Aaron Matthew
Contact List column types have a limit of 1,000 contacts that can be added to the column properties, yes. There currently isn't any workaround that I know of to include more in the Column itself.
Keep in mind that contacts that are a part of your My Smartsheet Contacts and your Organization's members will appear as you type in a cell, even if they're not specified in the column itself, see: Manage which contacts appear when you type in a cell
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
This format didn't work for me. I'm looking to add the email address and not the name. Can I see an example with a dummy email address included?
Update: I got this to work if anyone needs it.
-
It looks like I can only get 50 in my contact list column. Is see others are getting up to 1,000. Is there a setting I need to change?
-
Hi @Jen K.
Thank you for the update! I'm glad you were able to get this to work.
To clarify, are you adding values to the column properties or to a cell?
Cheers,
GenevieveNeed more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Hi @Genevieve P. ,
I could use your help on a few different items involving APIs and this is one of them. I am trying to add email addresses to a dropdown contact list column in a cell, I think. I can't go beyond 189. I can add the entire list of a total of 303, but it stops at 189.
-
I see the column index is 0, is this the main column ? if it is, try creating a new column and set it as Multi_Contact type, main columns are not intended to do almost anything but a key to the rest of the columns, therefore they are very restricted.
-
Hi @Alex Argumedo ,
I appreciate your help. This is not the main column. I made some adjustments and got 276, but I still have 27 email addresses that are not being added to the list. Do you have any other ideas?
-
Let me suggest to remove the name of the person, leave only the email, you might be hitting the max character limit of the cell (4k chars).
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives