Thanks Ashton! Very useful tutorial and just what i was looking for. Quick tip for anyone who is unable to get this to work, its likely you missed an important step of "setting up a trigger" 1. In the "Appscript" window, you will see a left panel where the third from top would be a "clock" icon 2. Click the "clock" icon and on this window, create a new trigger 3. In the popup, leave all default values except for the last drop-down "Select event-type" = "On form submit" 4. Click save Now, submit response on google form and you should start seeing the UID_Header field getting populated with IDs. Good luck!
Thank you so much, really this is the important step that was missed in this video and i have lost so many time for searching it. Finally i found your comment and fix my problem, thanks again!
I have one scenario where in sheet i have two columns - one is containing Id and other is containing Name . So in google form , If I select ID in one field then wanted name in next field automatically and in disabled mode
i have create new script and pasted the code. also i have editing response section in google form . also i have give header name as same as in my google sheet. assigned trigger for that. but at last trigger show 100% error. i am very upset to do that after doing lot of time... help???? what i can do now...???
Sorry, I have to say not possible. The confirmation message is updated before the user submits the form. We can’t predict user’s input when we update it.
I'd like to also have the ID display in the email subject line for each submission so I can easily find unique submissions when searching my inbox. Can this be done or at least how do I get the ID in the email so I can search for that specific submission? We currently receive submissions to our email inboxes and then respond to customers from there so having this ID in the subject line is ideal. Do you have a video on that?
@@ashtonfei Hello Ashton. Your work is great. I need a handle for the UID that I paste into an automated email. I have tried many ways. Unfortunately, the email does not display the correct UID or none at all. Thank you very much for your help!
@@ashtonfei i managed to use a switch with case in the onFormSubmit function to solve this...created separate class for each form based on your sample...but it runs to an error after trying to submit both the forms....im guessing the const clashes, since i just duplicated the class amd renamed them but left the const the same
@@ashtonfei what should I pay attention to if i get this error? - "No UID found in the current confirmation message with regex.." I am using 2 forms linked to the same sheet, when the first form is filled up, it runs successfully, but when the 2nd form is filled, this error pops up
I keep getting an error in line 12 and 31; "there is no linked form in this spread sheet" and "No UID found in current confirmation message with regex". Has anyone else experienced this or know how to fix it? Thank you!
Hi Emily You saw this error because the form was not connected to the spreadsheet and you didn't compose a confirmation message (or there is no initial id in the message, like UID-00001).
Good day - my code runs to line 55 and 65 and errors out ? Error TypeError: Cannot read properties of undefined (reading 'range') run @ Code.gs:56 _onFormSubmit @ Code.gs:65 What could it be ?
I get the error: TypeError: Cannot read property 'getSheets' of null getLinkedSheet @ Code.gs:24 App @ Code.gs:10 _onFormSubmit @ Code.gs:65 I have connected the the google sheet to the form but something is null?
@@tranquilmagister8481 hello! I get the same error: TypeError: Cannot read property 'getSheets' of null getLinkedSheet @ Code.gs:24 Application @ Code.gs:10 _onFormSubmit@Code.gs:65 How did you fix it, can you explain please?
@@ashtonfei ... the idea is to create a form into a mail and sent it to user. The user fill the form in that mail and send these infos to the excel area. Can you solve this issue?
You can not run this function manually. The event object is assigned only you bind a form submit event to call it. Or the event is undefined and you see the error.
@@winsupermarket3003 you need to create a new submission from the form to test the function. The submission will trigger the function _onFormSubmit, and an event object is passed there.
Thanks Ashton! Very useful tutorial and just what i was looking for.
Quick tip for anyone who is unable to get this to work, its likely you missed an important step of "setting up a trigger"
1. In the "Appscript" window, you will see a left panel where the third from top would be a "clock" icon
2. Click the "clock" icon and on this window, create a new trigger
3. In the popup, leave all default values except for the last drop-down "Select event-type" = "On form submit"
4. Click save
Now, submit response on google form and you should start seeing the UID_Header field getting populated with IDs. Good luck!
Thank you so much, really this is the important step that was missed in this video and i have lost so many time for searching it. Finally i found your comment and fix my problem, thanks again!
Thank you so much
It's working, need to set up Triggers and type UID0001 in confirmation message
Thanks Ashton, amazing Job!
sometimes it is not giving uid number just skipping the number kidly help me y
Thanks for this. I Tried it on one of my forms and it generates the same UID number for every entry. It doesn't change at all. How do I fix it?
I'm having trouble with the script. The UID does not seem to increment.
very nice work! thanks a lot my dear
did u get it to work?
@@crazyghost1277 yes and it worked properly, thanks mate!
It works! thanks so much
Thanks Boss (Ashton)
Hi Ashton! Thanks so Much for this! Really Helpful! Can you write a script to also trigger a What's app Message with Form Summary?
Thank you for this
I am getting this error eventhough I have added UID00001 in confirmation meassge."No UID found in the current confirmation message with regex"
You are my god
Form submission doesn't trigger the function. Is it needed to create a trigger function for form submission?
Yes, a trigger has to be created to run the script for updating the confirmation message so the next ID can be shown for the next response.
Thank you so much.
i want to apply this script in form which have already made in previous . but it is not worked . please help.
Thanks for the video, can you upload another video to show to connect to the sheet with the script please, or any other video show how to connect
I have one scenario where in sheet i have two columns - one is containing Id and other is containing Name . So in google form , If I select ID in one field then wanted name in next field automatically and in disabled mode
i have create new script and pasted the code. also i have editing response section in google form . also i have give header name as same as in my google sheet. assigned trigger for that. but at last trigger show 100% error. i am very upset to do that after doing lot of time... help???? what i can do now...???
How can i properly adapt the script into my own work? im having alot of trouble trying to adjust it
Thanks so Much
thank you Brother
What if the same person submitted again? Is it possible to get the previous ID the person had?
AMAZING AND THANKS
DEAR ASHTON,
IS IT POSSIBLE TO SHOW THE CITY NAME (OR ANY ELSE FILED) IN THE CONFIRMATION MESSAGE AFTER SUBMISSION.
Sorry, I have to say not possible. The confirmation message is updated before the user submits the form. We can’t predict user’s input when we update it.
@@ashtonfei THANK YOU
CAN SHOW CURRENT DATE AND TIME ?
@@presenterpk the same, you don’t know when the user will submit it.
@@ashtonfei THANK YOU,
YOU ARE DOING A GREAT JOB. I LEARNT A LOT FROM YOU.
Thanks!!
Thanks a lot
Very nice
Thank you
Can you advice me on how to set up the email for this please? can someone share the link?
anyone know if there is a way of getting the id to display on the form?
Dear Sir how to use multiple Google form Unique ID in one google sheet
Top
from where to get the code
I'd like to also have the ID display in the email subject line for each submission so I can easily find unique submissions when searching my inbox. Can this be done or at least how do I get the ID in the email so I can search for that specific submission? We currently receive submissions to our email inboxes and then respond to customers from there so having this ID in the subject line is ideal. Do you have a video on that?
Yes, Lacey. That’s possible with a script to handle the id generation and email notification. We can customize email subject and body.
@@ashtonfei Hello Ashton. Your work is great. I need a handle for the UID that I paste into an automated email. I have tried many ways. Unfortunately, the email does not display the correct UID or none at all. Thank you very much for your help!
@@ashtonfei Are you able to define how to do this?
the script seems to be having issues when I used it for a form that is linked in a spreadsheet that has multiple forms linked to as well...any tips?
Yes. That could happen, I need to review this issue.
@@ashtonfei i managed to use a switch with case in the onFormSubmit function to solve this...created separate class for each form based on your sample...but it runs to an error after trying to submit both the forms....im guessing the const clashes, since i just duplicated the class amd renamed them but left the const the same
@@ashtonfei what should I pay attention to if i get this error? - "No UID found in the current confirmation message with regex.."
I am using 2 forms linked to the same sheet, when the first form is filled up, it runs successfully, but when the 2nd form is filled, this error pops up
56,65 error unfilled problem
I keep getting an error in line 12 and 31; "there is no linked form in this spread sheet" and "No UID found in current confirmation message with regex". Has anyone else experienced this or know how to fix it? Thank you!
Hi Emily
You saw this error because the form was not connected to the spreadsheet and you didn't compose a confirmation message (or there is no initial id in the message, like UID-00001).
@@ashtonfei please we need o more video to show to connect and compose a confirmation message, this subject is very important . Thank in advance
Is it possible for Microsoft Form?
Very much thanks. Please, explain the script more than template.
please sir mail sent script text derails
Excellent one Ashton! Thank you...However the functionality to email the response back with the same "Unique ID" to the responder is not covered.
your source code doesn't work
What's error message did you get?
I cant see script option in tools
It's been moved to "Extensions" now.
@@ashtonfei Thank you so much
@@ashtonfei I'm lost! please help me. I can't find it
@@user-of8ue6ep7s You can't find the script menu? It's under menu Extentions > Apps Script.
Can somebody send the code?
@jarosawj7061
@ashtonfei
Good day - my code runs to line 55 and 65 and errors out ?
Error
TypeError: Cannot read properties of undefined (reading 'range')
run @ Code.gs:56
_onFormSubmit @ Code.gs:65
What could it be ?
Did you find any solution to it
I get the error:
TypeError: Cannot read property 'getSheets' of null
getLinkedSheet @ Code.gs:24
App @ Code.gs:10
_onFormSubmit @ Code.gs:65
I have connected the the google sheet to the form but something is null?
nvm i found the error, i tried to trigger it through he form instead of the sheet. And this kids is why i is important to listen to teacher :P
This is how we learn from the errors. 😀
@@tranquilmagister8481 hello!
I get the same error:
TypeError: Cannot read property 'getSheets' of null
getLinkedSheet @ Code.gs:24
Application @ Code.gs:10
_onFormSubmit@Code.gs:65
How did you fix it, can you explain please?
Thank you for share. Can this use this form in the mail not into doc.google.com area?
Sorry, not quite sure about your question.
@@ashtonfei ... the idea is to create a form into a mail and sent it to user. The user fill the form in that mail and send these infos to the excel area. Can you solve this issue?
@@catafest-work GAS-061 Embed Prefilled Form to Gmail ua-cam.com/video/dUGDwNoMHcs/v-deo.html
TypeError: Cannot read property 'range' of undefined
run @ Code.gs:56
_onFormSubmit @ Code.gs:65
in short issue with run(e) AND _onFormSubmit Event
You can not run this function manually. The event object is assigned only you bind a form submit event to call it. Or the event is undefined and you see the error.
I have same problem
@@ashtonfei So how shall we solve it?
@@winsupermarket3003 you need to create a new submission from the form to test the function. The submission will trigger the function _onFormSubmit, and an event object is passed there.
I am also getting the same problem. Can you please help? I followed exacly the steps. Created a forms, create the app scrip... =/ does not work
getting onformsubmit e undefined
you can not run the function manually, the e is undefined when you run it manually. It has to be triggered by a form submission.
@@ashtonfei yes i triggered the form but now e.range is undefined . I have tried to debug event object but not seeing any range property
TypeError: Cannot read property 'range' of undefined
run
@ code.gs:57
_onFormSubmit
@ code.gs:66
_onFormSubmit function should not be executed manually from the script project, it works only when called by a form submit event.
@@ashtonfei when submit form it will not reflect or any changes id in confirm Page
@@ashtonfei Same on my end. The UID does not generate in the response sheet after submitting a response.
Thank you 😊