Hi Marcin,
This is quite doable. But will require you to do some coding to achieve it.
I have similar code where someone submits a form and the data they enter is not correct, what I do is then grab the edit URL for the form and send that to them for them to update their form submission. Then when they resubmit, you will need to check what data has changed to understand the new additions.
Here is a function to get the edit url of the form submission:
/************************************************************************************************************
GetEditURL: Returns the URL to change a form entry based on formid and index given.
************************************************************************************************************/
function GetEditURL(index, formId)
{
var form = FormApp.openById(formId);
var editURL = " ";
var formSubmitted = form.getResponses(index);
if(formSubmitted.length > 0)
{
editURL = formSubmitted[0].getEditResponseUrl();
}
else
{
Logger.log("Failed to get Edit URL" + formId + " " + index)
};
return editURL;
};
The index passed in is the timestamp, usually its Column 1 of the Spreadsheet where the form submission is saved.
When looking at the spreadsheet, any value that was changed in the new form submission, is annotated. So just grab the notes for that range and if any of them are not blank, then they were updated. Here is how you grab the notes:
var s = SpreadsheetApp.getActiveSheet();
var dataRange = s.getRange(row,1,1, colEntered);
var updates = dataRange.getNotes()[0];
So just go through updates array to see what position in the row was changed.
Good luck.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/97b1522b-3183-4460-b086-33ecc82e21fen%40googlegroups.com.