Forum Discussion

jsears775's avatar
jsears775
Copper Contributor
Jul 25, 2024
Solved

Missing Instruction/Error in Automation Script

Hi all,   I'm sure this is going to be some basic thing, but I am getting an error when my automation script runs, specifically this portion below. What is missing or not formatted correctly? It is...
  • BA_Max's avatar
    Jul 26, 2024

    jsears775 

    Try removing some of the double quotes:

    "=OR(RIGHT(A1,1)=\"\"2\"\",RIGHT(A1,1)=\"\"7\"\")"
    "=OR(RIGHT(A1,1)=\"2\",RIGHT(A1,1)=\"7\")"

     

    I'm also not entirely sure, but couldn't you wrap in single quotes to make it easier to read?

     

    conditionalFormatting.getCustom().getRule().setFormula('=OR(RIGHT(A1,1)="2",RIGHT(A1,1)="7")');

     

    What line is line 58 - it'd probably help if you posted the entire code.

Resources