google-forms

How to use Google Apps Script to set the “values” and “go to section based on answer” for a Google Form dropdown?

限于喜欢 提交于 2021-01-29 07:57:33
问题 I using Google Sheets to store the "values" and "go to section based on answer" for a Google Form dropdown. How can I use the Google Apps Script to set both "values" and "go to section based on answer" for the dropdown? I am able to set values from Google Sheet using the script, but I am not able to set the "go to section based on answer" for the drop-down using the sheet and script. I already have the listItem of the dropdown in the script which I am using to set values. I tried using

Can I randomize items in MultipleChoiceItem?

微笑、不失礼 提交于 2021-01-28 11:32:21
问题 I'm new to GoogleAppsScript and now making quizzes in google form and spreadsheet by using GAS. I want to shuffle items in a MultipleChoiceItem when the google form is reloaded. A part of my current scirpt, slightly modified form this code, is presented below. //vars from spreadsheet var form = FormApp.openById(id); var ss = SpreadsheetApp.openById(question_bank_ID); var text = sheet.getSheetValues(questions[i]+1, 2, 1, 1)[0][0]; var options = sheet.getSheetValues(questions[i]+1, 5, 1, 5)[0];

How do i change/update validation of question (item) in google form with apps scripts

心不动则不痛 提交于 2021-01-28 10:51:53
问题 I have already try to update text validation for my class with google apps scripts but it say "textItem.setValidation is not a function". Please help me function setPass() { var form = FormApp.openById('Google Form ID'); var textItem = form.getItemById(Question ID); var textValidation = FormApp.createTextValidation() .requireNumberEqualTo(22111) .build(); textItem.setValidation(textValidation) 回答1: You are very close to update the question, you only need to add the method .asTextItem() after

I can't find “name” attribute while inspecting input elements of google form. How to find it?

☆樱花仙子☆ 提交于 2021-01-28 07:30:44
问题 I have a html form from which I want to store data to google spreadsheet. I created google form but when I try to inspect name attribute to link it with HTML form attribute, I couldn't find any. I want name="entry.###" attribute. Here is what I say when I inspect an input element: <input type="text" class="quantumWizTextinputPaperinputInput exportInput" jsname="YPqjbf" autocomplete="off" tabindex="0" aria-labelledby="i1" aria-describedby="i2 i3" dir="auto" data-initial-dir="auto" data-initial

Google Apps Script - How to get corresponding record in destination spreadsheet in onFormSubmit (Google Forms Event)?

匆匆过客 提交于 2021-01-28 07:04:18
问题 I catch this event when a respondent sends a response https://developers.google.com/apps-script/guides/triggers/events#form-submit_4 Inside this function, I want to add some information into the corresponding row (Google creates this row automatically) in the destination spreadsheet In order to do that, first I need to find this row The best way I can find at the moment is by using sheet.getLastRow() https://developers.google.com/apps-script/reference/spreadsheet/sheet#getlastrow But there is

Editing Form Responses Programmatically

夙愿已清 提交于 2021-01-28 01:08:02
问题 I have a google script that generates the edit URLs for each form response that is dumped into my spreadsheet. Is there a way to programatically change the response values as if I had actually opened the URL and changed the values manually? For example, suppose someone submitted a form with the name field being "Sam." I want to be able to programmatically edit this response so that the value of the same field is "Samuel." This is very easy to do manually via the form response edit url,

Concatenate certain rows into a cell ignoring duplicates

梦想的初衷 提交于 2021-01-28 00:30:10
问题 I have a google form and I would like to sort it's responses in a separate sheet on google sheets. The results of the form look sort of like this. Id Job 1 Shelving, Sorting 2 Sorting 1 Cleaning, Shelving 3 Customer Service 2 Shelving, Sorting which I would like to format into Id Jobs 1 Cleaning, Shelving, Sorting 2 Shelving, Sorting 3 Customer Service Is there a formula I can use to accomplish this, noting that it ignores duplicates and groups the different ids? Ordering of the jobs does not

How to dynamically create installable triggers as other users in Google Apps Script?

送分小仙女□ 提交于 2021-01-07 07:11:39
问题 So I have a Google Form-bound script that creates an installable trigger every time the Form is submitted. Now, I shared both the Form and the script to the actual users. At some point I have noticed that new triggers are not being created because quota limit is already reached. As I reviewed the list of installed triggers, I noticed that all of them are installed as "Me". How do I do it so that the other users who actually submitted the form (and created the installable trigger in the

How to dynamically create installable triggers as other users in Google Apps Script?

社会主义新天地 提交于 2021-01-07 07:10:10
问题 So I have a Google Form-bound script that creates an installable trigger every time the Form is submitted. Now, I shared both the Form and the script to the actual users. At some point I have noticed that new triggers are not being created because quota limit is already reached. As I reviewed the list of installed triggers, I noticed that all of them are installed as "Me". How do I do it so that the other users who actually submitted the form (and created the installable trigger in the

Google Form responses to email

喜欢而已 提交于 2021-01-01 09:27:12
问题 I want to get email once the form is submitted with only the filled in responses but not the blank or empty fields. I have did some research and found the below script which triggers email immediately to the email address present in the form. Also the email contains all the fields including the empty fields. Please help me achieve a script which fulfills my requirement. function setup() { /* First, delete all previous triggers */ var triggers = ScriptApp.getProjectTriggers(); for (var i in