How to eliminate leading apostrophe from values when updating columns via API
Hi,
I currently have a C# application that updates a few smartsheets and am struggling with leading apostrophes in most columns I'm updating. All of the columns are marked as Numeric/Text, and all data types of values being pushed are varchar/strings. However it seems that if the value being pushed does not contain any letters (for example, 56%, 489349343, 345,444 are all examples I've tried), the value gets a leading apostrophe added to it in Smartsheet.
Has anyone else experienced this or come up with a solution. Poking around I found that most people just ended up creating "helper" columns with formulas to remove the apostrophe, but I'd prefer to just not have it in the first place.
Any help would be appreciated. Thank you!
Answers
-
Hi @Danny553
When you have numeric values to input, are you wrapping these in quotes?
For example, this cell update request will input the values as Text:
https://api.smartsheet.com/2.0/sheets/xxxx/rows/xxxx
{ "cells":[ { "columnId": xxxxx, "value": "489349342" } ] }
Whereas this one will input the values as Numerical:
{ "cells":[ { "columnId": xxxx, "value": 489349342 } ] }
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
I have spent DAYS chasing this issue and reading 100 threads about this problem and THIS was the answer. As soon as I removed the quotes around numbers, everything started flowing fine. 😣
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