0

I would like to set up a (Google) form-filling system, that essentially has to be accessed and filled two times (before and after the completion of a project). I would like to create a form one can return to by filling in an ID number.

For that, I would need a script that automatically generates an ID number for each respondent. I have found 'Google Apps Script for Form, Generate Unique ID Number', but I couldn't get it to work (I am not good at scripting yet). I would like to be able to decide how the ID numbers are generated (for example to have non-numeric characters as well, e.g. XYZ000000001, XYZ00000002, XYZ00000003, etc.)

The reason I want to do this is so that respondents can access their own responses based on the ID assigned to Them. I found two possible solutions, but again, I can't manage them. One code is the 'Class FormResponse' that fetches the existent information (if I understand it well enough), and the other is 'Generate unique Form URL for each respondent' which generates a unique URL for each respondent. That would work fine, but I still need the IDs for easier data maintenance.

This is a lot of code and I'm not sure if it makes sense to combine all of it. Perhaps there is an easier way to achieve what I want with a way simpler script. I will break down the process as I imagine it, into steps:

  1. Send a form to AA@zive.com,BB@zive.com,CC@zive.com.
  2. For example, BB only has a project planned, so BB receives the form which asks: Is Your project planned or completed?
  3. BB chooses the first option and fills in the details.
  4. BB gets a unique ID which is inserted into the first column of the responses.
  5. The ID is sent back in a response email to BB (perhaps the linked script can be tweaked to send the unique ID).
  6. After a couple of months, BB has completed the project, so BB goes back to the form, either via the same email sent in step 1, or the same form embedded on a website.
  7. BB now chooses the second option, since the project is completed.
  8. The form asks for the ID number, BB fills it.
  9. All of BB's answers now go to the row with the matching ID, overwriting certain fields if necessary...

I am aware that this might be a bit complex, but any even partial answer accompanied by some snippets of code would be highly appreciated. I will gladly share it once I manage to compile the whole idea. :)

swiftBoy
  • 35,607
  • 26
  • 136
  • 135
mozzribo
  • 85
  • 1
  • 2
  • 14
  • Would it be acceptable to allow them to edit their response and provide them the link to do this so they can just change Planned to Completed? – Karl_S Oct 03 '16 at 15:05
  • Yes, They would need to add some additional info, but that should work the same. – mozzribo Oct 03 '16 at 20:35
  • In addition to the message from @Rubén see https://productforums.google.com/forum/#!topic/docs/LSKKCR3VHC8 for a function to save the url to edit a response in a spreadsheet as well ashttps://developers.google.com/apps-script/articles/mail_merge which is what I have based an email sender on from a form submission. I have the first function run, then send the email using the information in the second link. – Karl_S Oct 04 '16 at 13:08
  • Thank you, Karl. :) I'm going to work on it now and see if all this can serve as a solution. The second link is dead, so I performed a search - I suppose that this is the one You were suggesting? https://developers.google.com/apps-script/articles/mail_merge – mozzribo Oct 10 '16 at 09:13
  • That is what I was suggesting, Yes. I missed a space before the address. Sorry, – Karl_S Oct 16 '16 at 13:38

1 Answers1

0

Google Forms doesn't allow respondents to search previous sent responses. The only way that they can access a previously submitted response is by the edit response URL. To get this URL programmatically, use getEditResponseUrl.

You could send this URL by an email. For details see How to add "Edit Response" link to Google Forms emails?

Community
  • 1
  • 1
Rubén
  • 34,714
  • 9
  • 70
  • 166
  • Thank You, I will look into these and see what I can cook up! – mozzribo Oct 03 '16 at 20:36
  • Indeed, what I imagined was an unnecessary coding mess. There is a neat workaround [here](https://securitasdato.blogspot.nl/2014/11/sending-confirmation-emails-from-google.html) as well. – mozzribo Oct 31 '16 at 12:21