GAS-080 Add Unique ID to Google Forms Confirmation Message
#UID #GoogleForm #GoogleAppsScript
💮 about me 🔗 onescript.work/about
💮 upwork with me 🔗www.upwork.com/workwith/ashto...
🧑🏻💻 automate the boring
IMPORTANT!!!
Sorry, I forgot to tell you in the video. You need to create a trigger in the script project to run function "_onFormSubmit".
Copy the script file to your drive
docs.google.com/spreadsheets/...
Demo From:
forms.gle/ff5ESGe1eSfJbtc97
Source code:
github.com/ashtonfei/google-a...
Github repo: github.com/ashtonfei/google-a...
Gmail: yunjia.fei@gmail.com
Upwork Freelancer: www.upwork.com/freelancers/~0...
Twitter: / ashton_fei
Instagram: / ashton.fei
Buy me a beer: www.paypal.me/ashtonfei/
Пікірлер: 91
Thanks Ashton, amazing Job!
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!
@SabbirHosen-re4lo
Жыл бұрын
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!
@fasikagh6192
3 ай бұрын
Thank you so much
very nice work! thanks a lot my dear
@crazyghost1277
Жыл бұрын
did u get it to work?
@alajlan2012
Жыл бұрын
@@crazyghost1277 yes and it worked properly, thanks mate!
It's working, need to set up Triggers and type UID0001 in confirmation message
Thank you for this
Thank you so much.
It works! thanks so much
Thank you 😊
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?
Thanks so Much
Very nice
Thanks!!
Thanks Boss (Ashton)
How can i properly adapt the script into my own work? im having alot of trouble trying to adjust it
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
Thank you
Thanks a lot
You are my god
thank you Brother
Very much thanks. Please, explain the script more than template.
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'm having trouble with the script. The UID does not seem to increment.
Top
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 want to apply this script in form which have already made in previous . but it is not worked . please help.
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...???
What if the same person submitted again? Is it possible to get the previous ID the person had?
I am getting this error eventhough I have added UID00001 in confirmation meassge."No UID found in the current confirmation message with regex"
Can you advice me on how to set up the email for this please? can someone share the link?
sometimes it is not giving uid number just skipping the number kidly help me y
anyone know if there is a way of getting the id to display on the form?
AMAZING AND THANKS DEAR ASHTON, IS IT POSSIBLE TO SHOW THE CITY NAME (OR ANY ELSE FILED) IN THE CONFIRMATION MESSAGE AFTER SUBMISSION.
@ashtonfei
3 жыл бұрын
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.
@presenterpk
3 жыл бұрын
@@ashtonfei THANK YOU CAN SHOW CURRENT DATE AND TIME ?
@ashtonfei
3 жыл бұрын
@@presenterpk the same, you don’t know when the user will submit it.
@presenterpk
3 жыл бұрын
@@ashtonfei THANK YOU, YOU ARE DOING A GREAT JOB. I LEARNT A LOT FROM YOU.
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
2 жыл бұрын
Yes, Lacey. That’s possible with a script to handle the id generation and email notification. We can customize email subject and body.
@jarosawj7061
Жыл бұрын
@@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!
@WheelandSprocket
Жыл бұрын
@@ashtonfei Are you able to define how to do this?
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!
@ashtonfei
2 жыл бұрын
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).
@mohamedadel3618
2 жыл бұрын
@@ashtonfei please we need o more video to show to connect and compose a confirmation message, this subject is very important . Thank in advance
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?
@ashtonfei
2 жыл бұрын
Yes. That could happen, I need to review this issue.
@robertdevadason1885
2 жыл бұрын
@@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
@robertdevadason1885
2 жыл бұрын
@@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
Is it possible for Microsoft Form?
Dear Sir how to use multiple Google form Unique ID in one google sheet
Form submission doesn't trigger the function. Is it needed to create a trigger function for form submission?
@ashtonfei
25 күн бұрын
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.
from where to get the code
56,65 error unfilled problem
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.
I cant see script option in tools
@ashtonfei
Жыл бұрын
It's been moved to "Extensions" now.
@shree12333
Жыл бұрын
@@ashtonfei Thank you so much
@user-of8ue6ep7s
10 ай бұрын
@@ashtonfei I'm lost! please help me. I can't find it
@ashtonfei
10 ай бұрын
@@user-of8ue6ep7s You can't find the script menu? It's under menu Extentions > Apps Script.
Can somebody send the code?
@user-vx3bj9dn6b
8 ай бұрын
@jarosawj7061 @ashtonfei
your source code doesn't work
@ashtonfei
2 ай бұрын
What's error message did you get?
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 ?
@sidhbhardwaj1313
7 ай бұрын
Did you find any solution to it
Thank you for share. Can this use this form in the mail not into doc.google.com area?
@ashtonfei
3 жыл бұрын
Sorry, not quite sure about your question.
@catafest-work
3 жыл бұрын
@@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?
@ashtonfei
3 жыл бұрын
@@catafest-work GAS-061 Embed Prefilled Form to Gmail kzread.info/dash/bejne/lol7ptmHn7Cuk9Y.html
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
2 жыл бұрын
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
@ashtonfei
2 жыл бұрын
This is how we learn from the errors. 😀
@clemersonb
5 ай бұрын
@@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?
TypeError: Cannot read property 'range' of undefined run @ Code.gs:56 _onFormSubmit @ Code.gs:65 in short issue with run(e) AND _onFormSubmit Event
@ashtonfei
2 жыл бұрын
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.
@ayah8j
2 жыл бұрын
I have same problem
@winsupermarket3003
2 жыл бұрын
@@ashtonfei So how shall we solve it?
@ashtonfei
2 жыл бұрын
@@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.
@MrCarolciciliato
Жыл бұрын
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
@ashtonfei
Жыл бұрын
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.
@safaltammewar4233
Жыл бұрын
@@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
@ashtonfei
Жыл бұрын
_onFormSubmit function should not be executed manually from the script project, it works only when called by a form submit event.
@hemanthaak5015
Жыл бұрын
@@ashtonfei when submit form it will not reflect or any changes id in confirm Page
@marvinmarasigan1949
Жыл бұрын
@@ashtonfei Same on my end. The UID does not generate in the response sheet after submitting a response.