Formula works in sheet but not via API
Hi
I struggle with smartsheet api.
When i try to add column to a projet i have this error :
ERROR MESSAGE:
Error add column: {"result": {"code": 1310, "errorCode": 1310, "message": "Invalid column formula syntax, see help article https://help.smartsheet.com/articles/2481944?ss_lc=fr_FR&source=apphelpicon for more information.", "name": "ApiError", "recommendation": "Do not retry without fixing the problem. ", "refId": "16d8zjqdpw6ty", "shouldRetry": false, "statusCode": 400}}
BODY for Add column:
Colum not added: {"formula": "=IF(OR([Suivi DIP]# = \"Gris\", [Suivi DIP]# = \"Jaune\", [Suivi DIP]# = \"\"), \"A faire\", \"FINI\")", "hidden": false, "index": 42, "title": "Formule pour suivi des infos DIP", "type": "TEXT_NUMBER", "width": 101}
But the formula seems to work on project model
(For information, I have the same problem for the 6 other columns)
Any help will be welcome
Thank you
Answers
-
It looks like your language settings require semi-colons instead of commas in formulas. I tested your formula via API and it worked fine because I have my settings to use commas.
In your screen capture I can see that you use ; instead.
Try updating your API request to use semi colons within the formula:
{"formula": "=IF(OR([Suivi DIP]# = \"Gris\"; [Suivi DIP]# = \"Jaune\"; [Suivi DIP]# = \"\"); \"A faire\"; \"FINI\")", "hidden": false, "index": 42, "title": "Formule pour suivi des infos DIP", "type": "TEXT_NUMBER", "width": 101}
Cheers!
Genevieve
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
-
Thank for your feedback.
That was a silly thing, just a permission/access missing.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!