I use a google docs form to retrieve feedback from our customers. I then download this info into our offline system. Is it possible for google docs to give a unique value to each row it inserts into the spreadsheet as well as the timestamp?
feedback
|
|
You can do this by adding a script trigger. Supposing your current Form has two columns You need to first go to In the Script Editor window enter the following script:
Save the script and then go to the Populate the drop downs as follows:
Click Then Save and close the Google App Script window. Now when your form is submitted it will populate the row number in column C along with the data that has been submitted via your form. In you want to change the column that the row number gets saved to you need to change this line of the script:
and change the value 3 to the corresponding column index number. | |||||
feedback
|
|
Further to the excellent answer by Barry, if you want to be able to remove rows, and still keep a unique ID you can have a static cell that maintains a count. You can then use this number and increment it on every new entry to the table. So the modification would be to keep a number somewhere on your spreadsheet ('M1' in the code below) and modify the code to look like this:
Again, change the second last line to change where your ID is placed. | ||||
|
feedback
|
