google-form

How can an apps-script on a Form store extra data into the Sheet?

不问归期 提交于 2019-11-30 22:37:22
Q: How can an AppsScript attached to a Form store an extra piece of data into the Sheet? Situation: We have a (long) Google Form that stores many pieces of data into a Google Sheet. Often the entries need to be edited, and it is much easier to edit using the original form than trying to edit directly into the sheet. (Some of the items are text, several paragraphs long.) I would like to store into the spreadsheet one additional piece of data, specifically the URL that an editor can use to edit the row entry using the form. I can already get all the form data and I can get the right URL with

How can an apps-script on a Form store extra data into the Sheet?

时光总嘲笑我的痴心妄想 提交于 2019-11-30 16:59:03
问题 Q: How can an AppsScript attached to a Form store an extra piece of data into the Sheet? Situation: We have a (long) Google Form that stores many pieces of data into a Google Sheet. Often the entries need to be edited, and it is much easier to edit using the original form than trying to edit directly into the sheet. (Some of the items are text, several paragraphs long.) I would like to store into the spreadsheet one additional piece of data, specifically the URL that an editor can use to edit

Unique field validation in Google forms

倖福魔咒の 提交于 2019-11-30 15:32:34
问题 Using Google forms, data can saved to the spreadsheet. Now i would like to apply validation in Username field for avoid duplication. How can add UNIQUE validation in google form field using Google script? 回答1: I think it is not possible to add validation for fields in Google form values by using Google Apps Script direcly. One thing you can consider to change the settings in the Google form itself, if the Username field value is same as the Username that logged in to access that form. You can

Unique field validation in Google forms

别说谁变了你拦得住时间么 提交于 2019-11-30 14:33:10
Using Google forms, data can saved to the spreadsheet. Now i would like to apply validation in Username field for avoid duplication. How can add UNIQUE validation in google form field using Google script? I think it is not possible to add validation for fields in Google form values by using Google Apps Script direcly. One thing you can consider to change the settings in the Google form itself, if the Username field value is same as the Username that logged in to access that form. You can do this by checking the "only allow one response per person(required login)". If the above solution does

Google Spreadsheet Form, populate form options based on a spreadsheet

偶尔善良 提交于 2019-11-30 03:15:35
I need to find a way to have the multiple choice options in a Google form change based on a set of cells in a Google Spreadsheet that is constantly changing. Any ideas? The functionality you are requesting doesn't currently exist. A feature request around linking Google's forms to spreadsheets would be your best bet to keep the two in sync. There is always the option to create a form using URL parameters as outlined here: https://docs.google.com/support/bin/answer.py?hl=en&answer=160000 monchai It's possible. Write your owns script in the spreadsheet to update your form. If you're not

Google Apps Script - convert to CSV

*爱你&永不变心* 提交于 2019-11-29 16:43:13
I would like to export a Google Sheet to CSV on form submit. I have searched but the only thing similar does not separate it into different columns once I have converted it: Export spreadsheet or CSV text file from Google Drive Forms using script? It's a simple sheet with 8 columns only. Any help appreciated Once you get the values of a spreadsheet range, you'll end up with a two dimensional array. So to convert it, you'll have to construct a string that joins array array cell elements with a comma and join the rows with a new-line ("\n"); Haven't tested this, but should be something like this

setting up script to include google docs form data in email notification

落花浮王杯 提交于 2019-11-29 14:11:29
问题 I've setup a form using googledocs. I just want to have the actual data entered into the form emailed to me, as opposed to the generic response advising that the form has been completed. I have no skill or experience with code etc, but was sure i could get this sorted. I've spent hours+hours and haven't had any luck. My form is really basic.it has 5 fields. 4 of which are just text responses, and one multiple choice. I found this tute online (http://www.labnol.org/internet/google-docs-email

get form URL from a spreadsheet bound Form

人走茶凉 提交于 2019-11-29 12:36:56
In a spreadsheet script I want to send mail to users that will point them to the URL of a form that will let them enter data. I have tried: function test1(){ var formID = FormApp.getActiveForm(); var formUrl = DriveApp.getUrl(formID); sendMail(formUrl); return } This fails because the value of formID is allways NULL. Because you are working in the Spreadsheet, you need to get the associated form from the Spreadsheet object (e.g. SpreadsheetApp.getActiveSpreadsheet.getFormUrl() ). You will also need to send the mail message with the htmlBody optional parameter. Here is a code sniplet: function

The id of a FormResponse when a response is submitted is different when you list all FormResponses

好久不见. 提交于 2019-11-29 11:53:12
I'm working in a bug tracking backed by a Google Form and I think I'm stuck with a bug in Apps Script. When a response is submitted, my script onFormSubmit handler gets the FormResponse id (as in the sample below): function onFormSubmit(e) { log("ID (on submit):", e.response); } function log(msg, response) { Logger.log(msg + " " + response.getId() + "; response is '" + response.getItemResponses()[0].getResponse() + "'"); } Further, when I list all FormResponse s, I get different IDs, except for the first one, that is right. A sample code is below: function listResponsesId() { FormApp

Identifying Form destination (Spreadsheet AND SHEET)

ぃ、小莉子 提交于 2019-11-29 08:46:15
I'm working on a script that interacts with Google Form' response sheet. FormApp.getActiveForm().getDestinationId() give me the spreadsheet id, but I don't find a way to get the sheet itself. User can change its name and position, so I need to get its id, like in Sheet.getSheetId() I also have to determine the number of columns the responses uses. It's not equal to the number of questions in the form. I can count the number of items in the form: Form.getItems().length and then search for gridItems, add the number of rows in each and add them minus one: + gridItem.getRows().length - 1 Finally,