I have a system for accepting and reviewing grant applications. There are two forms:
form submitted by an applicant with a grant request
form sent by me to three reviewers to evaluate a grant request
I'd like to have the results of both forms in one spreadsheet:
Sheet 1 lists the data from the application forms (with an auto-generated serial number).
sheet 2 lists the data from all the reviews for all the applications (with a column for the serial number of the application that was reviewed).
I'm having trouble with:
1 - Specifying that both Forms' results go into the same spreadsheet, on different sheets.
2 - Adding a serial number to the applications and then adding the same serial number to the results of the three reviewers.
Any suggestions?
It is impossible to insert data of two Google Forms directly to a single spreadsheet using GAS without involving another two spreadsheets, because now the Forms are able to deploy data only to own spreadsheet and GAS has no any service to access to the Forms.
I'm going to be a little general as your asking a rather broad question, but I will do my best. I would consider using UiApp to build forms from the ground up. It will allow you more flexibility in function, and simple a smoother flow of information but since your question is about forms, I will stick to that.
Question 1:You'd want to create an OnSubmit function within each spreadsheet associated with the form 1 and 2 that copy the data you want to another spreadsheet.
function onFormSubmit() { // add an onsubmit trigger
var emailAddress = e.values[1];
var fullName = e.values[2];
var newSS = SpreadsheetApp.openById("Add New SS ID").getSheetByName('Sheet1');//one form should be 'Sheet2'
var range = sheet.getRange(sheet.getLastRow()+1,1,1,2);
range.setValues([[emailAddress, fullName]]);
Question 2: Assign a serial number. To my mind, you only want to assign a number to the applications, and then give that number to the reviewers for them to enter into the form. To assign this number, you can follow the Tutorial: Automating a Help Desk Workflow. Instead, I simply use the get last row, as I never delete rows in an active application so the row numbers are unique.
var serialNum = newSS.getLastRow()+1;
Then you can simply add that variable as you did the rest. I've not tested this code, so you may need to clean it up for your purposes.
Related
I want to make a google form where the user can submit data like the example below
The invoice and invoice date for each form will be the same while the rest of the data will be different. Is there a way to make the form in google sheet where the user can:
input invoice and invoice date only 1 time while the rest is manually inputted
send the result to google sheet with the same format as the table above?
This is unfortunately not possible in Google Forms currently, as each response must be written to a pre-determined row.
One way this might be achieved is by using a single instance of your form for each item in the invoice. Each response can then be appended to the existing sheet; although not an ideal solution, this is probably the best you will get with Google Sheets. See an example of how to do this here
Full disclosure: I originally posted this to the SE/Web application site but garnered zero comments amidst 15 views. Hoping for a better outcome here.
I'm involved in a citizen-science project polling recreational anglers about their preferred ocean fishing locations (lat-lon), a few characteristics about the location (depth, what species they catch, etc.), and some voluntary contact information. In spreadsheet form with each row being a unique location, there would be about 10 columns (each column being the response to a question).
I did a trial run with a small number of respondents using a Google Form that compiles all the responses to a Google Sheet, but due to limitations in Google Forms, respondents must submit a new form response for each fishing location they wish to provide. Every respondent said it was tedious and would prefer entering the data directly into a spreadsheet versus scrolling through 10 questions and submitting multiple forms to provide multiple locations.
Is there a process where I can distribute a link to potentially hundreds of people (who can in turn share that with whomever they wish) where the respondent is presented with an empty spreadsheet they populate with their responses? It would require that the field headers can't be edited and no one can see anyone else's responses. The spreadsheet would just look empty to each respondent. On the back end, the responses would be compiled into a single spreadsheet, much like how a Google Forms/Sheets works now. Google Forms is close - if they would just allow users to embed a Google Sheet in the form itself, I'd be set, but that's not possible at this time.
Edit - this is what the spreadsheet would include. Sorry I don't know how to properly embed or format this in tabular form. What each respondent would see is these column headers in a completely clean spreadsheet. They'd enter their data and submit, and on the back end, I'd have a master version of this that would append add each new location row-wise as they are submitted.
RowID | Latitude | Longitude | Target species 1 |Target species 2|Target species 3 | Habitat type| Home port | Name |Email address
click on this: https://docs.google.com/spreadsheets/create
copy-paste this fx in A1
=SPLIT("RowID|Latitude|Longitude|Target species 1|Target species 2|Target species 3|Habitat type|Home port|Name|Email address", "|")
copy the url
change edit#gid=0 to copy
take that URL and send it to your buddies and ask them to send you their URL of the sheet and enable sharing
or you can create those sheets for them and give to each of your people one spreadsheet
then create a new spreadsheet (master sheet) and use this in A2:
=QUERY({
IMPORTRANGE("url1"; "A2:J");
IMPORTRANGE("url2"; "A2:J");
IMPORTRANGE("url3"; "A2:J")}; "where Col1 is not null"; )
I'm hoping that someone can help me tweak (or even substitute) a formula that I'm using in Google Sheets to automatically populate columns with information based on inputs from a Google form.
Simply put, I am using the Index function to match the name that is selected from a drop-down menu in the Google Form and arrives in Column E of the Google Sheet receiving the responses with an identical list of names in Column A of 'Sheet 2'. The index formula takes information from 'Sheet 2' relating to that name (e.g. Registration Number, Email Address) and places it in the 'Formresponses 1'sheet alongside the inputs from the Google form (including, of course, the name that appears in Column E'.
I have been using (variations on) the following formula without any issues, but I have to manually drag it down the relevant column in 'Formresponses 1' each time a new entry/name arrives from the Google Form: =index(Sheet2!$B$2:$B,match(E2, Sheet2!$A$2:$A,0),1)
I have successfully used Array Formulas to automatically carry out other functions on data arriving from a Google Form (i.e. adding up individual numbers to arrive at an overall total), but in this case I cannot figure out how to create a formula that will automatically take each new name that arrives in column E and insert it into the relevant indexing formula at that end of that new row.
Any suggestions - or solutions! - would be greatly welcome!
Thanks,
A.
Cheers I'-'I,
I've used I'-'I's response to my original question here as a starting point and, with a bit of research, I've come up with the following working formula:
= ArrayFormula(vlookup(E2:E, Sheet2!A:E, {1,2,3,5},FALSE))
[The curly brackets simply indicate the columns in Sheet 2 from which I want to pull pieces of data relating to each name that is matched up in the 'front end' sheet receiving the responses from the Google Form.] As with my previous problems with array formulas, I found the following website really useful, so full credit has to go to it: benlcollins.com
I use Google Forms regularly at work, and I think they are awesome, especially since I am a total newbie with coding. With a few good plugins for Forms and Sheets, I am able to generate contracts, invoices, and so on very easily, based on document templates.
To keep it short, here is my request:
I have a form, where I input the customer's details, and upon submission, an addon generates a gdoc, based on a template. Al working great so far. My problem is that we are generating many different documents for a single customer, so it becomes a repetitive and very time-consuming task, considering that I have 15-20 different input fields for a customer, plus specific input fields for each different document.
The first input filed in my form is "Customer Name" and I have managed to create a dynamic dropdown list, that takes it's information from a specific column in a Google Sheet.
My request: how could I auto populate specific input fields in my Google Form, so that, based on my dropdown choice, the auto completed information will match the corresponding row present in the Google Sheet.
I have attached 2 images for easier understanding:
You can actually do this with a simple vlookup:
note: I also always wrap my functions with and if statement that checks if there is text in the first field, so try:
pretend that your dynamic customer name is in cell A1:
customer vat formula -
=IF(ISTEXT(A1),VLOOKUP(A1,'Parteneri'!A:C,2,FALSE),)
customer city formula -
=IF(ISTEXT(A1),VLOOKUP(A1,'Parteneri'!A:C,3,FALSE),)
How to write protect a cell once any user has written a value to it? Is there a formula? Here's what I'm trying to accomplish. Here's an empty monthly planned tests sheet on Google spreadsheets. About 60 teachers will have access to it. Their goal is to write in the name of their subject in a certain cell, which will mean they will carry a test on a certain day. Once a certain teacher writes the value, the cell needs to get closed from further edits by other teachers [first in, first out principle].
Some teachers would rewrite the values of their colleagues, some would do that by accident, etc. I would want the system to close the cell and even show a msg if that is possible to avoid rewrites or additions.
According to the law, we can have only 1 test per day in grades 1 to 7, and still some teachers would still try and write their subject when done on paper. Some would horrify me with their handwriting, which requires me to make phone calls, e-mails... So, I'm trying to make a digital transition.
Would appreciate any help. Scripting anyone?
For Google Spreadsheets, you have two options:
Hard way: create a custom script function that set cell permission. You attach the function to the sheet with installable trigger so that it will run under document owner permission.
Easy way: use Google Forms. You can create survey forms that function as the input interface. The editor can only submit new data but not view or edit existing data. You can set the spreadsheet permission to read-only if you want teachers to review data.