Copy link to clipboard
Copied
i used this exact same script as a custom keystroke script on a different pdf and it’s not working now any help is appreciated.
case "PERIODIC EVAL E4 AND BELOW ICO:":
this.getField("Return").setItems(["MAIN ADMIN"])
this.getField("1").setItems(["MO"])
this.getField("2").setItems(["AMO"])
this.getField("3").setItems(["DIVISION OFFICER"])
this.getField("4").setItems(["DIVISION LCPO"])
this.getField("5").setItems(["DIVISION ADMIN"])
this.getField("6").setItems(["BRANCH CHIEF"])
this.getField("7").setItems(["LPO"])
this.getField("8").setItems([" "])
this.getField("9").setItems([" "])
this.getField("10").setItems([" "])
break;
Copy link to clipboard
Copied
Post the full script and the full text of the error message, please.
Copy link to clipboard
Copied
SyntaxError: syntax error 1: at line 2
when I take out line 2 that is there I error travels!
Copy link to clipboard
Copied
That's the full code? If so, you're missing the "switch" command.
Copy link to clipboard
Copied
Can you elaborate, I’m stuck because this worked as is on a different pdf.
Copy link to clipboard
Copied
It couldn't have. The code is incomplete.
Here's more information about the switch method in JS: JavaScript Switch Statement