我用谷歌表单制作了以下脚本:
function myfunction (e){
var Naam = e.values[1] //column b - works fine
var Adres = e.values[2] //column c - works fine
var Postcode = e.values[3] //column d - works fine
var Woonplaats = e.values[4] //column e - works fine
var Email = e.values[5] //column f - works fine
var Aantal = e.values[6] //column g - works fine
var Totaal = e.values[9] //column j - doesn't work
var Verzendmethode = e.values[11] //column l - doesn't work
var subject = "Bestelling kaarten Getup Standup"
var message = "Beste " + Naam + ",\n\nBedankt voor uw bestelling de "
+ Aantal + " kaarten " + Verzendmethode + " wanneer u "
+ Totaal + " EURO over maakt op rekeningnr.
nl1ABNA1234567890\n\nHartelijk dank voor uw bestelling en
wij wensen u vast een prettige avond"
MailApp.sendEmail(Email, subject, message);
}
列j [9]的值是将列g [6]的值乘以5并将列i [8]的值(0或2.5)相加的结果,具体取决于在多项选择题中的选择。
列l [11]的值是预定义文本,也取决于多项选择题中的选择。
在电子表格中,一切正常。我只想在发送给访问者的确认邮件中使用列j和l的值。相反,它现在陈述未定义。
任何想法都会非常受欢迎。