Formula works in sheet but not via API

11/09/21
Answered - Pending Review

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

  • Hi @Raphael Obadia

    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

  • Thank for your feedback.

    That was a silly thing, just a permission/access missing.

Sign In or Register to comment.