google-form

How to split single rows into multiple rows depending on whether one cell has values separated by commas or new lines in Google Sheet?

别来无恙 提交于 2019-12-24 12:01:04
问题 The spreadsheet has some cells with cell contents that are separated by commas, or a new line. 123, 876, 456 Column "C" is the column that determines whether a row should be split up into multiple rows. EXAMPLE Spreadsheet Information from the Form goes into the "Form Submission" page. We have a specific format that we must meet to submit to our report tracking software that requires the issue numbers (found in Column C) to be separated into their own rows with the information found in

FormResponse.getId() returns the wrong value right after the response is submitted

别来无恙 提交于 2019-12-23 16:19:00
问题 I am writing a program that requires the ID of various google form responses. My program first creates the form object and gets the responses: var form = FormApp.openByUrl("..."); var allResponses = form.getResponses(); If the form response is a few hours old, it isn't an issue: SpreadsheetApp.getUi().alert(allResponses[102].getId()); //Displays the correct value, 2_ABaOnufSugrHZ4swdyqxJ5hCxyDuFCdO5F_5glYgHsFCZotI99MFMX1IjGK3EQ The problem occurs when I'm using a newer response (a few minutes

Google Apps Script - Run javascript as the form is being filled by users

余生长醉 提交于 2019-12-23 15:13:41
问题 I am new to Google apps script and need help. I an trying to achieve the following - Set a trigger for lost-focus of a textbox in google form. The code in this event will be A. Get the value of a textbox B. Set the value of a textbox 回答1: Unfortunately this is not currently possible with Google Apps Script and Google Forms. Apps Script can be triggered by the submission of a Form, but it cannot interact with the Form in the users browser. It is possible to build a form entirely in Apps Script

refresh google form item list onOpen

痴心易碎 提交于 2019-12-23 05:22:39
问题 I have a google form with an item list for all the employees. I am populating this list from a MySQL table. I am trying to refresh the form with an updated employee list every time the google form is opened. I have an on open event trigger but for some reason the list does not get updated. Please let me know. function onOpen(){ var form = FormApp.openById('239jelkwpeowppd-3843ikeifd89wered'); var conn = mySQL(); var itemList = getEmpList(conn); var item = form.getTitle('Approver:'); item

Creating a Multiple choice quiz from google forms

孤者浪人 提交于 2019-12-23 04:56:25
问题 I am trying to create a multiple choice quiz,that takes questions from a question bank,using GOOGLE FORMS and the results are stored in a spreadsheet. I already know how to create a quiz and store the data in the spreadsheet,but I don't know how to use a question bank. Can anyone help me with this? Thanks in advance. 回答1: Recently Google announced that they added several methods to Google Apps Script Forms service to make it able to handle Google Forms quizzes programmatically. Thanks to this

Display Form in Sidebar

限于喜欢 提交于 2019-12-23 04:28:59
问题 I am not sure if what I am trying to do is even possible. I am trying to put a google form into the sidebar of a google doc. Right now I have an apps script document plugin that opens the sidebar fine, and I am able to open the form using var form = FormApp.openById('form_id'); But I don't know how to get a html object or blob from a form element that I could use to embed the form in the sidebar. I also can't use iframes as those are disallowed. 回答1: While you can display a google form in a

Regular Expression for 3 digit without 000

给你一囗甜甜゛ 提交于 2019-12-22 11:33:50
问题 I want to write a regular expression on Google Form First Character between 1 to 9 Second and Third any alphabets (Upper Case) and next 3 characters should be number like 541 or 001 but not 000 This expression is also taking 000 [1-9][A-Z]{2}[0-9]{3} 回答1: Use alternations: [1-9][A-Z]{2}([1-9][0-9][0-9]|[0-9][1-9][0-9]|[0-9][0-9][1-9]) See regex demo Here, [1-9] - matches 1 digit from 1 to 9 [A-Z]{2} - two uppercase ASCII letters ([1-9][0-9][0-9]|[0-9][1-9][0-9]|[0-9][0-9][1-9]) - 3

Google Forms App Script : How to check if current submission is editing response or a new response

萝らか妹 提交于 2019-12-22 08:52:09
问题 I am working with google forms via app script. I want to determine if the current form that is being submitted is in edit mode or a new response? How can I check this in the onSubmit event. If yes that user is edit a previously submitted response than I want to change the value in my spread sheet to "yes". below is a snippet of my code: function testExcel2() { var email = "email"; var s = SpreadsheetApp.openById("id"); var sheet = s.getSheets()[0]; var headers = sheet.getRange(1,1,1,sheet

Send Form with MailApp after fetching html. Embed Google Form into email. Generated email contains only text

不羁的心 提交于 2019-12-21 17:25:06
问题 I want to embed a Google form in an email and send it with MailApp. I'm attempting to use code found at: https://stackoverflow.com/a/23671529/4305236: var form = FormApp.create('New Form'); .... var url = form.getPublishedUrl(); var response = UrlFetchApp.fetch(url); var htmlBody = HtmlService.createHtmlOutput(response).getContent(); MailApp.sendEmail({ to: email, subject: subject, htmlBody: htmlBody, }); ... The logs show all the html for the form. However, when I run the code, the email

Google Forms - Instant Conditional branching

ε祈祈猫儿з 提交于 2019-12-21 12:59:49
问题 I am writing a survey on Google Forms (part of Google Docs), and I notice there are some scripting capabilities built in. I wanted to know if it were possible to show and hide questions immediately, based on a choice from a bullet-point list, but without using the page-break method you are meant to use for conditional branching. We have planned to have lots of fiddly choices, which would take up an excessive number of pages. By hiding and showing various <div></div> , I am hoping that you can