【发布时间】:2014-01-26 17:31:21
【问题描述】:
我有一个 Google 表单,其中提出了一个问题,“是否已创建传单”,如果答案为“否”,那么我需要从表单提交中收集某些数据,并在外片。 I have a drawing here.
第一张表 (the sheet with the form is here) 工作表 #2 (sheet that will get a new conditional row submit is here)
我已经启动了一个脚本来执行此插入,但我没有完成脚本的知识。
function onFormSubmit(e) {
var timestamp = e.values[0];
var name = e.values[1];
var phone = e.values[2];
var classTitle = e.values[4];
var dueDate = e.values[7];
//when there is field 19 in this sheet answer is No (There has not yet been a flyer created) this is when the insert would happen and the Field 19 answer is not something that needs to be carried to the new row in the external sheet)
var formCreated = e.values[19];
var workType = "Flyer" ;
var contextNote = "This job was imported from a Org Learning's Class Reservation Form and followup will be required for clarification" ;
var destinationSpreadSheetKey = "0Ai_2YLvaQba0dHA2bTdtd0pnTTZQcnRldjJXcjFjZHc";
var destinationSheet = "Work_Orders";
//if the answer to variable formCreated is "Yes", then halt Else continue with script
有人会帮我写这个脚本吗?我有一张图中田地的地图。
谢谢,
戴夫
【问题讨论】:
-
Google 论坛中的解决方案已接近尾声。我将在此处添加解决方案,以便为可能有类似需求的人提供答案。
标签: forms google-apps-script google-sheets