google-form

Google form file upload: get filename instead of link to file

▼魔方 西西 提交于 2020-01-24 20:13:25
问题 I have a simple google form which has a file upload option. The uploaded files are saved in my drive folder. I then have a simple script which executes on form submit to save the form values (upload filename, name and email) to a text file. Here's my app script to do that: function onSubmit(e) { var file = e.values[1]; // getting the link instead of the filename var name = e.values[2]; var email = e.values[3]; var folderId = "0B6de05UZOb0y1ck4tV3BPWldpMU14SGZncnlHa0tzTXVoZFk"; var folder =

Google form file upload: get filename instead of link to file

会有一股神秘感。 提交于 2020-01-24 20:12:26
问题 I have a simple google form which has a file upload option. The uploaded files are saved in my drive folder. I then have a simple script which executes on form submit to save the form values (upload filename, name and email) to a text file. Here's my app script to do that: function onSubmit(e) { var file = e.values[1]; // getting the link instead of the filename var name = e.values[2]; var email = e.values[3]; var folderId = "0B6de05UZOb0y1ck4tV3BPWldpMU14SGZncnlHa0tzTXVoZFk"; var folder =

Cannot get date from google sheet filled by google forms

喜欢而已 提交于 2020-01-24 01:10:15
问题 Purpose: To extract date and time from a sheet (created by filled google forms) and use them in the body of email to be set automatically using the script. Script editor code: function sendEmails() { var sheet = SpreadsheetApp.getActiveSheet(); var startRow = 16; // First row of data to process var numRows = 1; // Number of rows to process for( var j=startRow; j<startRow + numRows; j++) { var color = sheet.getRange(j, 10).getBackground(); if("#00ff00"==color) { // Fetch the range of cells A2

How to create HTML Data entry form using Google spreadsheet as backend

放肆的年华 提交于 2020-01-22 21:23:05
问题 I have a google spreadsheet, where some rows append on daily basis and using the google spreadsheet, the customer feedback team follows up. Google Spreadsheet Data. https://docs.google.com/spreadsheets/d/1V-XZdCUZAQVkfCat9vXVxITjjNMxNMPDin6B5j9uMWY/edit?usp=sharing The above mentioned Google Spreadsheet always have the below mentioned data at google sheet (Highlighted in blue): Ref ID Company Name Contact No.1 Contact No.2 Project Name Agent ID Rest of the mentioned details would be captured

With google forms and scripts is it possible to create a script which will limit the amount of points that user can give in all scale inputs?

不羁岁月 提交于 2020-01-16 13:23:32
问题 I have a form with 10 scale questions going from 1 to 10. I would like to give each user 30 points and if they select more than 30 totaling on all scales, disable the submit button and show notification. I have added a script trough Tools->Script editor, but cannot find an example or trigger which would give me that kind of functionality. Is it possible, or I have to write my own form template with custom javascript? Tnx in advance 回答1: Apps Scripts on Forms run in either the form editor or

Unknown Status in Google App Script Project Executions

有些话、适合烂在心里 提交于 2020-01-15 10:07:49
问题 I have an Google form that field crews fill out and submit. The attached javascript emails the contents of the form as emails to everyone in the office. The execution times are super long. One has 19496 reported seconds, when Gsuite should automatically terminate any script at 5 minutes. Some have "Unknown" status in the Google app script execution log and 0 seconds. Is the Gsuite quota being used up? Is there an error in my script? The user running the script trigger also receives a bounce

Load or Read a JSON from local in Google AppScript

自闭症网瘾萝莉.ら 提交于 2020-01-14 04:17:08
问题 I am looking to read a json file, namely config.json from a AppScript to generate a Google Form from the meta data in the config.json . I am not sure how to read the JSON file - could someone help me with it please? Some example code would be greatly appreciated.. Thanks 回答1: Assuming that your file is in Google Drive, you can use the DriveApp service to read the file and parse it. function getFileContent() { var fileName = "config.json.txt"; var files = DriveApp.getFilesByName(fileName); if

get form URL from a spreadsheet bound Form

て烟熏妆下的殇ゞ 提交于 2020-01-10 04:33:11
问题 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. 回答1: Because you are working in the Spreadsheet, you need to get the associated form from the Spreadsheet object (e.g. SpreadsheetApp.getActiveSpreadsheet.getFormUrl() ). You

Copying Images between Google Form quizzes

余生长醉 提交于 2020-01-07 05:39:06
问题 I am trying to copy Google quiz items from one Form to another, which appeared to have been completely successful. However, I forgot that some of these items have images attached to them. Here's a link to an example quiz. There's nothing documented to suggest how to access these, but I have tried getImage both from the Item and the Item.asMultipleChoiceItem but neither is recognised. It's just the last 2 lines of code that aren't working. I get TypeError: Cannot find function getImage in

Google sheets script that sends a notification upon form submission if data is recorded in a specific column

不想你离开。 提交于 2020-01-07 05:26:06
问题 I'm trying to create a script for new google sheets that sends a notification if a form is submitted and contains data in a specific column. In this example, if the question that populates data in column E is answered in the form, I would like an email notification with a link to the spreadsheet. In the below script, if I set the trigger to on edit it will work if column E is edited. I cannot get it to work with on form submit, however. Can anyone help with fixing this script to work on edit?