Created
June 8, 2010 22:47
-
-
Save psychemedia/430753 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Test function for Google Apps Script onFormSubmit | |
//Two sheets in a single spreadsheet doc | |
//First sheet corresponds to form | |
//Second sheet just displays one of the elements from the most recent form submission | |
// the function testOnSub() has a trigger associated with it: 'From spreadsheet' 'On form submit' | |
function testOnSub() { | |
var ss = SpreadsheetApp.openById(SPREADSHEET_KEY); | |
var sheet=ss.getSheets()[1]; | |
var form=ss.getSheets()[0]; | |
var lr=form.getLastRow(); | |
var el=form.getRange(lr,2,1,1).getValue(); | |
var t=el;//"done"; | |
sheet.getRange(1,1,1,1).setValue(t); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment