Google Form - Using Apps Script to Populate Google Sheet

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Thank you very much, I and the operations users of my company appreciate it.
Greetings from Colombia

williamm
Автор

Google Apps Script Code in Video Below:

function onFormSubmit(event) {

record_array = []

var form = FormApp.openById(''); // Form ID
var formResponses = form.getResponses();
var fromCount = formResponses.length;

var formResponse = formResponses[fromCount - 1];
var itemResponses =

for (var j = 0; j < itemResponses.length; j++) {
var itemResponse = itemResponses[j];
var title =
var answer = itemResponse.getResponse();

Logger.log(title);
Logger.log(answer);

record_array.push(answer);
}

AddRecord(record_array[0], record_array[1], record_array[2]);

}

function AddRecord(first_name, last_name, color) {
var url = ''; //URL OF GOOGLE SHEET;
var ss=
var dataSheet = ss.getSheetByName("Sheet1");
dataSheet.appendRow([first_name, last_name, color, new Date()]);
}

CodeWithCurt
Автор

Hi Curt, thanks for the code, it has been very helpful.
I have a question, if my form consists of two different sections how do I pass the answer of the second section to a new line in sheets without deleting the line with the answers of the first section, who will be the above line of this new one? Thanks.

joaquimdias
Автор

But Google forms responses are automatically populated to Spreadsgsheet without the need to use this script

SalAbraham
Автор

BTW if u submit 2 responses from separate devices at the same time, in the excel file it only shows one of the responses but it duplicates it.

zerox
Автор

Good day sir, is it possible make it the other way around? Dynamically change google form's questions from google sheets, i.e. in Form question number 1, a list of car models, be in dropdown list or the selectin list from sheets then question number 2 would dynamically change depending on the selection in question 1. basically an EASY CRUD version of google form, hope I make sense somehow. right now I still can't digest the manual doing of the CRUD web app... Thanks

JSinc
Автор

Can you please tell me how to get drop-down and check box values into sheets

gamesworld_all
Автор

Great video Curt! Got a few questions if ya don't mind. Firstly, are they advantages to using apps scripts to populate the google sheet as opposed to just linking the form to the sheet? Secondly, do the questions on the google form need to match the column names in the google sheet that the responses are populated with? for example, if a question on the form is "What is your date of birth?" can the corresponding column name in sheets be "Birthdate?"

Thanks mate!

mawuenaakwayena
Автор

Great video!!! What would be the script if I have check boxes with the multiple choice questions?

dansouza
Автор

can possible to customize the form layout into 3 or 4 columns using app script?

fastcookingtechniques
Автор

Please provide a small project where data display in google forms from Google Sheet by search option

organickrishi
Автор

Good day sir, is there a way to make a reverse thing like I want to populate the google form using the datas from the spreadsheet using the app script?

vb
Автор

I’m a complete newbie. I need my form to send data to more than one sheet. How do I make this script send to two sheets. Added bonus if you could explain how to set it up in a different column so that it goes to the next row, but starts in column B instead of A. I hope that make sense!

joannegott
Автор

How to give URL of uploaded photos in google sheet

udplearn
Автор

Hi, I just made a Google form and link it with a spreadsheet, but suddenly the number of responses doesn't correspond to the number on the spreadsheet, I got 23 response on the form and only got 20 on the spreadsheet, and I don't know how it happen. Is it a bug or something? Is there any way to fix?. Thank u for anyone who would answer my question.

andresmichael
Автор

I want to create a form that logs something that gives me a clue as to who or what workstation, or something, submitted the form, without asking the user who they are, so I can see if people are submitting multiple answers without making them log into google when using the sheet. Seems like if I just add one more parameter to the appendrow function, that would do it. But what? is there a function that can access the responder's ip address, or workstation name, or location (the answers will all come from managed chromebooks, I can specify location in the admin console)?

robertwickberg
Автор

Why did you do this, when Google Forms does this anyway ?

minimaggot
Автор

Did you type all that script or was it automatic from the creation of the form?

kevinnichols
Автор

or can we create like a repeat table on google form?

fastcookingtechniques
Автор

SO think you would have a hit with combining this with your Creating a estimate geneerator using a form builder as those two would combine the most commonly sought out videos of what people want to do for learning programming like this in the first place. However if you already did it than clap clap cause I find myself coming back to learning form you more than any other programmer to sheer tone of voice and non schalant BS lets getr done attitude. Clap clap again.

DoYouDJ