I have a form that I want to email. When it creates the email, I have a script that inputs the sender's email, a subject line that inputs the name of the person filling the form from the "empName" field, and the body text including the employee name as well as the date specified in the "weekEnd" field. I want to add the totals for each row (Regular, Vacation and Sick). For some reason the script breaks when I try to add the row totals. Here is my script when it works:
var oDoc = event.target; oDoc.mailDoc({ bUI: true, cTo: "jsmith@example.com", cCC: "dpsmith@example.com", cSubject: "Weekly Employee Time Summary for "+empName.rawValue, cMsg: "Attached is the Weekly Employee Time Summary for "+empName.rawValue +" for the week ending "+weekEnd.formattedValue });
If I just add one of the row totals, the submit button doesn't work. Here is the code with the addition of one row total:
var oDoc = event.target; oDoc.mailDoc({ bUI: true, cTo: "jsmith@example.com", cCC: "dpsmith@example.com", cSubject: "Weekly Employee Time Summary for "+empName.rawValue, cMsg: "Attached is the Weekly Employee Time Summary for "+empName.rawValue +" for the week ending "+weekEnd.formattedValue +". Vacation Total: "+vacTotal.rawValue });
Any ideas why it's failing? Attached is the file itself
https://drive.google.com/uc?export=download&id=0B3ZhSiIWrwvWUUhfa0hCZl JFX00