How to update a cell with a formula?

Jose Cardenas
Jose Cardenas ✭✭
edited 12/09/19 in Formulas and Functions

What would the syntax be in the formula portion of the update be? I'm confused because some of the formulas I work with have the double quote character in it. For example, I have this as apart of my request.

"formula":"=IF([Manager]@row = "Tom Hank", "TM", IF([Manager]@row = "John Oliver", "JO", IF([Manager]@row = "Elvis Presly", "EP")))"

It seems to me that the quotes near names will throw off the syntax of the call and force an error. To avoid this should I replace them with the single quote ( ' ) or do I need make sure it gets sent in as an escaped double quote ( " )? I can't seem to find an example of the syntax online so hoping to get some clarification

Just a heads up, I didn't write this formula, I just need to work with it.

Comments

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭

    Hi,

    The "Text" is used with text to get an exact match or to have text shown as part of the formula or to show an empty cell.

    Do you get an error message? Can you share a screenshot or the sheet?

    I hope this helps you!

    Have a fantastic week!

    Best,

    Andrée Starå

    Workflow Consultant @ Get Done Consulting

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

  • Yeah so the error I get is as follows

    { "errorCode": 1008, "message": "Unable to parse request. The following error occurred: Field \"cells\" was not parsable. Unexpected character ('T' (code 84)): was expecting comma to separate OBJECT entries\u000A at [Source: java.io.PushbackInputStream@7dd855b8; line: 1, column: 551].", "refId": "ou982b9axv5t" }

    I checked the column that it would be in (551) and it points at the 'T' in "Tom Hanks"

    IF([Manager]@row = "Tom Hank", "TM", IF([Manager]@row = "John Oliver", "JO", IF([Manager]@row = "Elvis Presly", "EP")))

    I'm assuming that the formula field parses, hits the Double quote just before the T and assumes that the formula is finished. It expects a comma but of course I'm trying to use the Quote to reference exact match for the column in the row. 

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭

    I'm sorry, but I thought that this was in a cell on the sheet, but I see now that you've marked it with API. 

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!