I am trying to automate some extra data generated to a form response using Google App Script; (in particular, a unique identifier). I can trigger a script on a form response, but I have multiple forms connected to this sheet document, so I need to make sure that the correct form is triggering the response, and then I would like to write the values to the correct sheet of the document.
How do I check which form is being triggered, and how can I find the sheet that collects it's responses?
var sheetId = "..."; var range = e.range; if(sheetId !== range.getSheet().getSheetId().toString()) { return; }
Which is somewhat hackish, but ok, it works. – xor