Column Type difference between API and GUI
Hi All,
I have a somewhat confusing issue within a sheet where the API is reporting a different column type to the interactive gui.
Attempting to force the column shown by the API from TEXT_NUMBER to MULTI_CONTACT as per the GUI through the API results in a success returned, however the subsequent re-query returns TEXT_NUMBER again and all whilst the web gui maintains it's a CONTACT_LIST with "Allow multiple contacts per cell" option ticked.
Anybody got any ideas what would cause this? And moreover......how do I persuade the API to display the same as the gui?!!
Worth mentioning that this column was originally TEXT_NUMBER when created and the later modified to be a MULTI_CONTACT.
Screen grabs attached showing results.
Comments
-
In the GET Sheet request there is a query string parameter called level. The docs note it specifies whether multi-contact data is returned in a backwards-compatible, text format (level=0, default) or as multi-contact data (level=1).
Without this in place a CONTACT_LIST column that has multi-contacts enabled will have a type of TEXT_NUMBER for being backwards compatible text. For your request add another Param with a key of level and a value of 1. This should get it to return the type of the column as MULTI_CONTACT_LIST.
I would suggest also adding objectValue to your include Param to get the data in the cell back as MULTI_CONTACT data instead of just the displayValue. You can separate ownerInfo and objectValue with a comma to have both be used.
-
Hi Dave,
Thank you! Spot on, works perfectly, I totally overlooked that.
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives