Copy link to clipboard
Copied
Good morning,
I am having an issue figuring out what is wrong with my java script. I copy and pasted an old one I used (and worked/works fine), but this time it's giving me a syntax error. Any help is greatly appreciated, I'm sure it's something simple I'm missing. I am creating a submitable form.
It tells me "SyntaxError: missing } after property list 5: at line 6".
var DEPT = this.getField("DEPT").valueAsString;
var RQSTNAME = this.getField("RQSTNAME").valueAsString;
var PROJNAME = this.getField("PROJNAME").valueAsString;
var LEADER = this.getField("LEADER").valueAsString;
- this.mailDoc({cTo:"email@email.com", cSubject: "Project request for: Dept "+DEPT+" - Requestor "+RQSTNAME+" - "+PROJNAME+" - "+LEADER+", cMsg: "Please see the attached project request."});
1 Correct answer
I recommend using a plain-text editor that has code coloring capabilities, like Notepad++. If you do that it will become immediately clear what the issue is. Here's how it looks like:
As you can see, the string after +LEADER+" is not closed, which screws up the rest of the line.
You can remove the last part of it entirely, so just end with +LEADER .
Copy link to clipboard
Copied
I recommend using a plain-text editor that has code coloring capabilities, like Notepad++. If you do that it will become immediately clear what the issue is. Here's how it looks like:
As you can see, the string after +LEADER+" is not closed, which screws up the rest of the line.
You can remove the last part of it entirely, so just end with +LEADER .
Copy link to clipboard
Copied
Awesome thanks!!

