Forum Discussion
jsears775
Jul 25, 2024Copper Contributor
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...
- Jul 26, 2024
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.
BA_Max
Jul 26, 2024Iron Contributor
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.
jsears775
Jul 26, 2024Copper Contributor
You were 100% right! The double quotes seemed to messing it up, it ran without error when I replaced it your correction.
And apologies, that was lines 56-64 of my script, you ended up right in line 58 anyways. Thank you so much for your help!
And apologies, that was lines 56-64 of my script, you ended up right in line 58 anyways. Thank you so much for your help!