How to select multiple options in dropdown by c# Smartsheet (NuGet 2.126.0 version)
Multiselect dropdown has values - One, Two, Three, Four
and we need to select these options by sending values in c#
I am using below method to add values
cellsToAdd[cellCount] = new Cell.AddCellBuilder(columns[cellCount], true).SetValue(new List<string> { "One", "Two" }).SetStrict(true).Build();
It throws error of unable parse to request
Same goes for string array
And if used plane string - "One,Two", it creates new option in the Smartsheet.
options is not working with this specific Smartsheet NuGet version (2.126.0) - System.Collections.Generic.List<Smartsheet.Api.Models.Option> options = new System.Collections.Generic.List<Smartsheet.Api.Models.Option>();
Answers
-
Hi @Harish H
The Smartsheet API Documentation has examples of methods on the right, where you can select your language preferences.
In your instance, the example for adding a row with a multi-select cell is as follows:
{ ColumnId = addedColumns[0].Id, ObjectValue = new MultiPicklistObjectValue(new string[] {"Bat", "Cat"}) }
I am unfamiliar with NuGet but if you are having trouble with it I would suggest posting in either StackOverflow to get help from other developers or check with NuGet to see if there's an updated version you may need.
If you've encountered an issue with an SDK, please note that SDKs are not supported directly by Smartsheet Support. However, you can report the issue on the SDK's Github page. This will help ensure that the issue is tracked and addressed appropriately.Cheers,
GenevieveNeed more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.1K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives