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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 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