GAS-012 Generate a Random ID for Google Forms with Apps Script

💮 about me 🔗 ashtonfei.github.io/
💮 upwork with me 🔗www.upwork.com/workwith/ashto...
🧑🏻‍💻 automate the boring
Update from Ashton 10 May 2020:
1. If you want to generate a sequential UID and send the UID to the respondent after submission, please make a copy of the below file to your Goole Drive and follow the instruction in the sheet "Guide".
docs.google.com/spreadsheets/...
2. Here is the Google Form link where you can submit a test to see the email with UID in it. Let me know if any issue or further customization is needed with the email notification.
forms.gle/SrVsg7KsqQWLAHwD8
This is Ashton Fei, from Shenzhen China.
Gmail: yunjia.fei@gmail.com
Upwork: ashton_fei
Wechat: ashton_fei
Twitter: / ashton_fei
Instagram: / ashton.fei
Apps Script Support: goo.gl/forms/GhJC63annAtIsif72
Script file:
docs.google.com/spreadsheets/...
Google Form:
docs.google.com/forms/d/e/1FA...

Пікірлер: 213

  • @ashtonfei
    @ashtonfei4 жыл бұрын

    Update 20 Jun 2020: Please use a real email address when you trying to get the uid in my test form, or you will not see the result. Update: I add both sequential and random functions in this file, you can modify the code per your requirement. Please check the guide in the sheet. If you want to generate a sequential UID and send the UID to the respondent after submission, please make a copy of the below file to your Goole Drive and follow the instruction in the sheet "Guide". docs.google.com/spreadsheets/d/1lNI1NxG_XS3zoEWStHG9mPzde2yj9OOyIXfAfgjmrVY/copy Here is the Google Form link where you can submit a test to see the email with UID in it. Let me know if any issue or further customization is needed with the email notification. forms.gle/SrVsg7KsqQWLAHwD8

  • @kesavanthiruvaimoli2458

    @kesavanthiruvaimoli2458

    4 жыл бұрын

    Can you upload only UID sequential auto-generate , not random one

  • @patroceniomorgado6595

    @patroceniomorgado6595

    3 жыл бұрын

    Hi so interesting but I dont have realy a knowlege in coding can I share the response form to you then you add the coding, if thats OK to you if not No problem. Thank you.

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    Did you make a copy of my file?

  • @zgo99
    @zgo994 жыл бұрын

    Awesome man! I made a hybrid script from this video and the updated one from the description. Working perfectly. Thank you so much!

  • @joelatmcdwebworks
    @joelatmcdwebworks3 жыл бұрын

    Thanks for this! Very helpful.

  • @rasyidmustapha3203
    @rasyidmustapha32033 ай бұрын

    thank you! you made my day!

  • @gabsdonati
    @gabsdonati4 жыл бұрын

    Amazing! Thank you!

  • @szaman2638
    @szaman26383 жыл бұрын

    Thanks for the tutorial. Is it possible to display the UID to the user when they complete the form?

  • @iqbalsirajudin
    @iqbalsirajudin2 жыл бұрын

    Hi, is there a way to display the previous ID in the next Google Form? Especially when you want to do invoicing and want the check the latest Invoice Number without having to open a Google Sheet. Hope you can help. Thanks

  • @JustinAquino
    @JustinAquino5 жыл бұрын

    Thanks for this script ashton! I finally have a way to randomly generate characters for a Table-top RPG i'm running. I just need a little bit of help. I was able to make it work. 1) if I want to create multiple random stats (rolling for Strength, Dex, Background, Life Events, etc...) does that mean I have to make copies of the same script and alter some key details? What should I look for in the original script, i know made some alternations from this video). 2) I know this is designed not to repeat numbers (its a Unique number generator) how do I remove that Uniqueness? 3)If you have any tips if I'm going to make a lot of these? or other tips to make these easier?

  • @cocoray1000
    @cocoray10005 жыл бұрын

    Thanks a lot !

  • @phsd1307
    @phsd1307 Жыл бұрын

    Thanks a lot for the tip! I know that the person can receive this ID by email. Is it possible for the person to access the same form again and using the ID he/she has edit his/her answer instead of sending a new answer?

  • @graysonlofstad9916
    @graysonlofstad99162 жыл бұрын

    Sorry if you get alot of notifications from me, I am trying to learn how to do this without knowing code at all, which is making it super hard. The tutorial both in the video and in the description is giving me issues, as your form is linked to the OG sheet and not the copy i receive. i then after, i attempted to remake the form and sheet, copying the code from the copy, but i couldn't get it to generate a UID with the new sheet however. I tried as much as a new guy could think of but it just wasnt working. How do i take the code from the copy and add it to a new sheet? and i need a custom form to use for the sheet

  • @MsFarhanis
    @MsFarhanis Жыл бұрын

    Hi Ashton! I've copied the file given below but I only receive the Spreadsheet. Where can I find the form too?

  • @AS65298
    @AS652983 жыл бұрын

    Hello Ashton, It is very good detailed video and it fulfilled my first requirement of getting the Random Unique ID for each entry in the Google Form. However, I have other requirement where, whenever if select particular option the Unique ID should be prefixed with particular text. For e.g. While filling the form if i Select Option 1, it should generate something like PYHB15451MP and If i select Option 2 it should give me something like PYHB15451SP.

  • @akotechonline
    @akotechonline4 жыл бұрын

    ReferenceError: "getRndNmber" is not defined. (line 10, file "Code")

  • @rostommagsino3707
    @rostommagsino37073 жыл бұрын

    hello sir i followed all ive watched to your videos but still got this error TypeError: Cannot call method "getDataRange" of null. (line 6, file "Code") i already change name my sheet please help

  • @mohanlalkoli12
    @mohanlalkoli124 жыл бұрын

    Cool!

  • @rehatsekejab8812
    @rehatsekejab88124 жыл бұрын

    Thank you so much,,,

  • @ZahratAlafrah
    @ZahratAlafrah3 жыл бұрын

    Hi, thanks for the explanation 1- How can I run the web link directly after the submit form button? 2- How can I show the sender's mail in the form field without typing it? 3- How do I get a student to check-in and check-out only twice a day ? Thank you ....

  • @MusicnSongss
    @MusicnSongss2 жыл бұрын

    Can we give search button in google form if yes then please give knowledge about the same

  • @lorrylabs8278
    @lorrylabs82785 жыл бұрын

    Just a bit stuck with what this means TypeError: Cannot call method "getDataRange" of null. (line 6, file "Vehicle/Trailer Defect Report")

  • @ashtonfei

    @ashtonfei

    5 жыл бұрын

    You need to change the spreadsheet name to “Auto ID”.

  • @ashtonfei
    @ashtonfei5 жыл бұрын

    Here is another solution for auto ID generation with an array function. Example to add the id to column H, paste below formula to cell H1. =ARRAYFORMULA(IF((A:A)"",IF(ROW(H:H)=1,"ID Column Header","ID Prefix" & ROW(H:H)+9999),"")) You can modify the ID column header and ID prefix in the formula. Update the column reference H:H if you need the id in other columns.

  • @aziraz7865

    @aziraz7865

    5 жыл бұрын

    Hey this was the best, exactly what I was looking for! thanks

  • @ayushcomputex1278

    @ayushcomputex1278

    5 жыл бұрын

    ID prefix mean ?

  • @ayushcomputex1278

    @ayushcomputex1278

    5 жыл бұрын

    Please send me spreadsheet file for this formula

  • @ranabirmahata8384

    @ranabirmahata8384

    4 жыл бұрын

    My certificate id are automatically generated. But I want to change this id and make a new id. This new id are start on (SMMC/SANS/WEB/S/0001). How to do it ? Please tell me.

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    You can try to change the "Prefix ID" with "SMMC/SANS/WEB/S/" in the formula. =ARRAYFORMULA(IF((A:A)"",IF(ROW(H:H)=1,"ID Column Header","SMMC/SANS/WEB/S/" & ROW(H:H)+9999),""))

  • @premforever316
    @premforever3164 жыл бұрын

    THANK YOU MAAANNNNNNNN

  • @anamedeiros6151
    @anamedeiros61515 жыл бұрын

    Hello Ashton, I was trying to test your script throug the form you shared here, and it seems not to be working anymore, do you have an update? Same happened with a form I had created 3 days ago, it was perfectly generating an random ID from each individual input from Google Forms and now its no longer appearing. I am very frustrated right now cause I have a delivery to do at work and I cant seem to figure how to do this any longer. You think you can help me? Thanks a lot

  • @ashtonfei

    @ashtonfei

    5 жыл бұрын

    Hi Ana. Has the issue been solved? Please send an email to yunjia.fei@gmail.com if any support is required.

  • @lucyladbrook7161
    @lucyladbrook71614 жыл бұрын

    Hi! thanks so much for sharing this. I know this problem has come up a few times but I'm getting an error message: TypeError: Cannot call method "getDataRange" of null. (line 6, file "Code")Dismiss Sorry if I'm being a total idiot but this has really stumped me, would you be able to give me a hand please? var ss = SpreadsheetApp.getActive(); var ws = ss.getSheetByName("Auto ID"); var data = ws.getDataRange().getValues(); var rowNum = data.length; var colNum = data[0].length; ws.getRange(rowNum, colNum).setValue(uid);

  • @ankurdasavi8787
    @ankurdasavi87872 жыл бұрын

    From Where i can get the script??

  • @haniarhossain9680
    @haniarhossain96804 жыл бұрын

    Is there any way that the person who submitted the form also be able to get the number right after the person hit the submit button, on the confirmation page?

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    Nope. For google form, the confirmation page is configured as static content, the script is triggered after you submit (after you see the confirmation page). Even the confirmation page can be updated by the script, but you only can see it in the next submission.

  • @VidyaPrabodhini
    @VidyaPrabodhini4 жыл бұрын

    Hello Ashton Sir I tried your illustrated code, but the ID field in the excel doesnt show anything. Requesting you to kindly help. I have shared the document via your email ID.

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    I've updated the script in your file, please check it out.

  • @alizamariecatalan4636
    @alizamariecatalan46365 жыл бұрын

    Hi Ashton, i am getting error message TypeError: Cannot read property "length" from undefined. (line 8, file "Code"). Can someone help me how to fix this? thank you

  • @ashtonfei

    @ashtonfei

    5 жыл бұрын

    Hi Aliza, Could you share your file with me so I can check to code? yunjia.fei@gmail.com

  • @absolutedgefindout726
    @absolutedgefindout7265 жыл бұрын

    You are checking that if the id is already generated you re-generate it in the if statement, what if the new id generated is again a duplicate ID? I think you need to put the id generation in a while loop instead of using an if, correct me if I'm wrong. Thanks.

  • @ashtonfei

    @ashtonfei

    5 жыл бұрын

    yep, you’re absolutely right about it.

  • @ashtonfei

    @ashtonfei

    5 жыл бұрын

    Thanks for pointing this out, I've updated my code.

  • @absolutedgefindout726

    @absolutedgefindout726

    5 жыл бұрын

    You're welcome.

  • @absolutedgefindout726

    @absolutedgefindout726

    5 жыл бұрын

    You need to add a caption in your video of the correction, so viewers may know. :)

  • @TechnoWit3D
    @TechnoWit3D4 жыл бұрын

    It's a cool function. Thanks, but is it possible to show the UID, on the response page?

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    It's not possible to show it on Google Form, however, you can have other options with apps script. Option 1. Send a customized email with the UID included to the respondent. Option 2. You can build a custom form web app with apps script, in the script you can add the UID to the response page, it can be fully customized. kzread.info/dash/bejne/m3WjsKtucdPLf5M.html

  • @TechnoWit3D

    @TechnoWit3D

    4 жыл бұрын

    @@ashtonfei Thanks ..I'll have a look ..

  • @pharmacykktp4444

    @pharmacykktp4444

    4 жыл бұрын

    @@ashtonfei Hi, thanks for the sharing of generate random uid. Really appreciate it. here, i have 2 questions: 1. Can the number been generate in a running order? eg: 1st respondent will be given UID00001, then 2nd respondent is UID00002 & so on? 2. can you share on how to build a custom web app with apps scripts? what is the web app do you recommend?

  • @alexliu419
    @alexliu4194 жыл бұрын

    Could the sequential UID be sent to the respondent through auto email after the submission?

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    Yes, it’s possible. And I think I already included that feature in the script if I remember it correctly.

  • @wctins
    @wctins3 жыл бұрын

    Hi Ashton, I need to add some code to call the data from the row in the e-mail response. I used a code that i have but the e-mail isn´t sending after that. I add inside the _onFormSubmit function: var objects = dataRange.getValues(); for (var i = 0; i var rowData = objects[i]; } var estudantName = rowData[4]; var requestProcess = rowData[3]; the question are: 1 - what I am doing wrong? 2 - The last "}" is in the right place? 3 - If I put outside the function, doesn't work. Thanks in advance

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    function sendEmails(){ const name = "Responses" // update this sheet name with yours const ws = SpreadsheetApp.getActive().getSheetByName(name) const values = ws.getDataRange().getValues() // row starts from 2, the first row is the header row for (let i = 1; i let studentName = values[i][4] let requestProcess = values[i][3] let subject = "Email subject" let email = "test@gmail.com" // update this email address with yours let htmlBody = `Hi ${studentName}${requestProcess}` GmailApp.sendEmail(email, subject, "", {htmlBody}) } }

  • @wctins

    @wctins

    3 жыл бұрын

    ​@@ashtonfei Thanks for the answer, but I think I expressed myself wrongly what I wanted. I still wants to use the same _onFormSubmit function to send email. I got it right after many tries and will post the code here if anyone is interested: ____________ var ws = SpreadsheetApp.getActive().getSheetByName(sheetName); var values = ws.getDataRange().getValues(); for (let i = 1; i let studentName = values[i][4] let requestProcess = values[i][3] ___________ ps: Need to add one more "}" before GmailApp.sendEmail... to work correctly!

  • @pratikmishra4807
    @pratikmishra48074 жыл бұрын

    Those who are getting this error TypeError: Cannot call method "getDataRange" of null. (line 6, file "sheet name") Please note: 'sheet name' does not refer to the name of the google spreadsheet but to the name of the tab at the bottom of the worksheet making this change will solve the error

  • @gabsdonati
    @gabsdonati4 жыл бұрын

    Hey @Pratik Mishra ! I have a question: Is it possible, when the person submits the form and the spreadsheet generates a random ID number, to automatically send that ID number to the email of the person who submitted the form? If I manage to do that, it would be amazing!

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    yes, it is 100% possible.

  • @gabsdonati

    @gabsdonati

    4 жыл бұрын

    @@ashtonfei Thank you for responding, and so quickly! :D Could you be so kind to help me out with this? I have been researching everywhere, but can't find a definitive solution. =(

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    Gabriele Donati could you give me your email? I will send you a similar project so you can check it out.

  • @gabsdonati

    @gabsdonati

    4 жыл бұрын

    @@ashtonfei Of course Ashton! Here it is: gabriele.donuts@gmail.com

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    I shared the script file with you and you also can get it from the video description, I just updated it.

  • @kazaa8
    @kazaa84 жыл бұрын

    works thanks! Any ideas how I can share this ID for example to email from form?

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    Please check your email box, I’ve sent you a sample form.

  • @kazaa8

    @kazaa8

    4 жыл бұрын

    @@ashtonfei working perfect :)

  • @jorgedieck7754

    @jorgedieck7754

    4 жыл бұрын

    @@ashtonfei could you send this sample form as well please Ashton? Thanks a lot! Great video =)

  • @asejik1

    @asejik1

    4 жыл бұрын

    Great video! I'll also appreciate if this can be sent to me as well. Thank you.

  • @olufemialatise7005

    @olufemialatise7005

    4 жыл бұрын

    ​@@ashtonfei Weldon Ashton, you have done a great work, appreciate. Please i really need your help to send me this idea, wanted to ensure the auto generated ID can be referenced as field in a acknowledged mail, almost similar to what lukasz is requesting, to mail from form ( alatiseolufemi@gmail.com)

  • @REOTopTheLET
    @REOTopTheLET4 жыл бұрын

    Hello sir. Can you please share to us how to send an autogenerated number to people who submitted our form?

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    Please send me your form, ID format to my email, I will add my script for you.

  • @audieamorato9531
    @audieamorato95313 жыл бұрын

    Hi, Thank you for this video! Unfortunately, I am having some problem with this: TypeError: Cannot read property 'range' of undefined (line 7, file "Code") Can you help me with this? Thanks again.

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    Did you rename the form sheet name to “Auto ID”?

  • @audieamorato9531

    @audieamorato9531

    3 жыл бұрын

    @@ashtonfei Hi Ashton, I am using it now and it is working already; filling it up and sending it with my own email. Although it works now still there is this "TypeError: Cannot read property 'range' of undefined (line 7, file "Code")" which bugs me.

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    You still get the error?

  • @audieamorato9531

    @audieamorato9531

    3 жыл бұрын

    @@ashtonfei yes sir I did, but it works.

  • @rifqialvaro5

    @rifqialvaro5

    3 жыл бұрын

    @@audieamorato9531 How did u do it? I keep getting the same error message and when I try to submit my own form I did'nt get any email notification for the ID

  • @markpaulotajanlangit8749
    @markpaulotajanlangit87493 жыл бұрын

    How can I fix this error, please help. TypeError: Cannot read property 'range' of undefined (line 7, file "Code") Just want to generate random numbers and embed that numbers in my Google Docs template and use autocrat. Thank you.

  • @audieamorato9531

    @audieamorato9531

    3 жыл бұрын

    Hi, same problem here! Did Ashton Fei answer? Thanks!

  • @techpaoyt1992

    @techpaoyt1992

    3 жыл бұрын

    Nope, he did not 😅 But I was able to figure it out. I just renamed my Google Sheet (Response) sheets name to the ones sir Fei have and deleted the code for sending an email. It took me 3 hours or so for that 😂😂😂

  • @andrelyncaballero6324
    @andrelyncaballero63244 жыл бұрын

    sir please help me again with the same problem thank you

  • @onswiftwingsofficial
    @onswiftwingsofficial2 жыл бұрын

    Why doesn't this work anymore? I made a copy of it to my drive and it shoots out an error "TypeError: Cannot read property 'getDataRange' of null add_uid @ Code.gs:6"

  • @onswiftwingsofficial

    @onswiftwingsofficial

    2 жыл бұрын

    Okay, I had to tweak the code a bit. The biggest change I made was to the add_uid function... function add_uid(){ var uid = create_id(); var ss = SpreadsheetApp.getActive(); var ws = ss.getSheetByName("JOB QUEUE"); var data = ws.getDataRange().getValues(); var rowNum = data.length; var colNum = data[0].length; ws.getRange(rowNum, 28).setValue(uid); } ...The code in the video was set to find a random column number/letter. I set it to a static column (28). Hope that helps some people out there.

  • @patroceniomorgado6595
    @patroceniomorgado65953 жыл бұрын

    Hi so interesting but I dont have realy a knowlege in coding can I share the response form to you then you add the coding, if thats OK to you if not No problem. Thank you.

  • @azwadsabit6082
    @azwadsabit60825 жыл бұрын

    How could the recipents get the id?

  • @TechnoWit3D

    @TechnoWit3D

    4 жыл бұрын

    That's right

  • @WhatsAbhiDoing
    @WhatsAbhiDoing4 жыл бұрын

    can Access the code in given spreadsheet can you help how to copy the code?

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    Make a copy of the spreadsheet to your google drive, the code will be copied to the new file.

  • @uctrong2638
    @uctrong26383 жыл бұрын

    hello Ashton your video still works well up to now, however, I can create a fixed column for UID. Can you share with me how to locate the UID in a fix column

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    I don’t remember if the UID column is fixed or not. But you can check GAS-080, you can place the UID column anywhere you like in this script. And you may find a solution there.

  • @uctrong2638

    @uctrong2638

    3 жыл бұрын

    @@ashtonfei Well it didn't work as I expected like this Video. Your UID appeared in right column ID. But my UID it appeared in the A column. Can you fix this for me.

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    In GAS-080, you can move the uid column to any where you like in the spreadsheet. You need to do it manually.

  • @andrewfry25
    @andrewfry255 жыл бұрын

    Ashton Fei, in one of your comments below, you stated that you updated your code. Where might we find that updated code? Would you be willing to share it, please? Fantastic work you did here, thanks for sharing it!

  • @ashtonfei

    @ashtonfei

    5 жыл бұрын

    Thanks for your comments. The update was from line 20 to 22. You can find the code in below link, and please ask for access if you can't see it. script.google.com/macros/d/M54OCOMF2ApBvAvA0Cy-vE7ID7KnGVQZq/edit?uiv=2&mid=ACjPJvEK8CbCUdS-5u9NRRlvBpjAgHTJ_ORh7EGuRYCKmO7gRKJJQsQp6B9HAAw0M5ReTx-4SuwNKitCCCmqwF8Tn_ReleP4WOYXrJWV3gakg8FfufsQFiSowrCLg9QdUQ0dFAG0IrHOOAk

  • @andrewfry25

    @andrewfry25

    5 жыл бұрын

    @@ashtonfei thank you very much!! I have requested access.

  • @andrewfry25

    @andrewfry25

    5 жыл бұрын

    @@ashtonfei So I have tested out your code from above. Well done. Thanks for posting it. I would still like to test out the updated version where you use 'while' in place of 'if'. I requested access to it. I do have a question though. I noticed that the UID is being posted to the last column of the data set in the spreadsheet. Is there any way to define which column it should place the UID? It would even be better if the column could be defined by a name so that no matter where the column was placed in the spreadsheet, it would always populate with the new UID. What do you think?

  • @ashtonfei

    @ashtonfei

    5 жыл бұрын

    @@andrewfry25 Sure, you can do that by changing the colNum to the column you need. Basically, you can loop all column names and find the column index number you need.

  • @andrewfry25

    @andrewfry25

    5 жыл бұрын

    @@ashtonfei Thanks Ashton! Yes, I figured out that I could change the var colNum to 3 and it will always place it in the third column. Great!! But now I need to figure out how to put it in the column labeled "XYZ", so that if that column ever changes location, the number will still be placed in the correct column. You mentioned looping through the column names ... I will have to check that out.

  • @starling___
    @starling___3 жыл бұрын

    i am facing this problem , "TypeError: Cannot read property 'getDataRange' of null (line 7, file "Code")" - please help

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    Please check the sheet name matches the name in the script “Responses”

  • @starling___

    @starling___

    3 жыл бұрын

    @@ashtonfei now its working - thanks a lot

  • @anaclaramedeiros4110
    @anaclaramedeiros41105 жыл бұрын

    Hi guys, any idea about how to generate a sequential number instead of a random? thanks a lot

  • @ashtonfei

    @ashtonfei

    5 жыл бұрын

    Yes. Sequential number is much easier than random.

  • @ketanjoshicfp

    @ketanjoshicfp

    4 жыл бұрын

    @@ashtonfei Hello Ashton...could you please provide a tutorial for generating sequential number.😊

  • @lazyo4631
    @lazyo46315 жыл бұрын

    bro can you please tell me how I can show serial id on google form?

  • @ashtonfei

    @ashtonfei

    5 жыл бұрын

    Sorry, I can't do that. The id is generated in google sheet, there is no link to the form.

  • @TheKrishnasudha
    @TheKrishnasudha2 жыл бұрын

    my code is running but UID is showing in specific colm "p"

  • @TheKrishnasudha

    @TheKrishnasudha

    2 жыл бұрын

    Hi Ashton Could you please help

  • @ashtonfei

    @ashtonfei

    2 жыл бұрын

    Could you please share your project with me?

  • @dmesht6390
    @dmesht63904 жыл бұрын

    ReferenceError: script_Properties is not defined please tell me the solution imediately.

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    Sorry, I didn't use variable script_Properties in my code. Is it an issue you found on your own script?

  • @andrelyncaballero6324
    @andrelyncaballero63244 жыл бұрын

    please help i have error encountered. (TypeError: Cannot call method "getDataRange" of null (line 6, file "Code") Dismiss when i check the project properties in script properties i see the UIDnumber. kindly help

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    Please check if the sheet name of the form responses is changed to “ID”

  • @andrelyncaballero6324

    @andrelyncaballero6324

    4 жыл бұрын

    @@ashtonfei sir i check and i changed the ID name but my problem right now is the auto generated does not appear in my google sheet. i only see it in the script properties. please help

  • @andrelyncaballero6324

    @andrelyncaballero6324

    4 жыл бұрын

    my first problem was ok and thanks for reply this second problem was different

  • @andrelyncaballero6324

    @andrelyncaballero6324

    4 жыл бұрын

    the auto id number does not appear in the google sheet.... please help sir

  • @jhawar-ji
    @jhawar-ji4 жыл бұрын

    Where is the script link? the link in the description opens spreadsheet and the form

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    Please make a copy of the spreadsheet to your drive, the script will be copied to the new file.

  • @jhawar-ji

    @jhawar-ji

    4 жыл бұрын

    @@ashtonfei how to copy it, when I open the link, the spreadsheet opens

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    In the file menu, you should be able to find a button called “make a copy”.

  • @jhawar-ji

    @jhawar-ji

    4 жыл бұрын

    @@ashtonfei thanks a lot man

  • @motiur90792
    @motiur907923 жыл бұрын

    Thank you very much Is there any way to send the generated code who submitted the form?

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    Yes. Please check the form in the pined comments. You can submit a test with your email to see the result.

  • @motiur90792

    @motiur90792

    3 жыл бұрын

    @@ashtonfei Thank you for the instant reply. I couldn't found the pined comment. Can you please mention me in this comment or give me the link, please.

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    Motiur Rahman forms.gle/SrVsg7KsqQWLAHwD8

  • @motiur90792

    @motiur90792

    3 жыл бұрын

    @@ashtonfei WOW!!! How can I get the code?

  • @motiur90792

    @motiur90792

    3 жыл бұрын

    Or Any video link

  • @easylearnhacker8190
    @easylearnhacker81905 жыл бұрын

    it's not working , i faced a problem that was TypeError: Cannot call method "getDataRange" of null. (line 6, file "Code")

  • @ashtonfei

    @ashtonfei

    5 жыл бұрын

    Please check line 5 in your code, the "Auto ID" is the sheet name. Make sure you changed it if your sheet name is not "Auto ID". var ws = ss.getSheetByName("Auto ID");

  • @easylearnhacker8190

    @easylearnhacker8190

    5 жыл бұрын

    google form link docs.google.com/forms/d/e/1FAIpQLSeyHC0atwZBt02jdOo2cOx-SIebqes1HfQfIBYnA0lsczUFiQ/viewform

  • @easylearnhacker8190

    @easylearnhacker8190

    5 жыл бұрын

    google sheet link docs.google.com/spreadsheets/d/16Zziga_Ckl_G6oFtD84VI8mbnAY2hdQwnzetvpeLJOo/edit#gid=313959273

  • @easylearnhacker8190

    @easylearnhacker8190

    5 жыл бұрын

    please brother help me, it's same problem

  • @Eme-life

    @Eme-life

    5 жыл бұрын

    i face this problem TypeError: Cannot call method "getDataRange" of null. (line 6, file "Code")Dismiss

  • @mindworkshr
    @mindworkshr3 жыл бұрын

    Can we link two separate Google forms with a same unique ID generated. Like in pairs ..

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    How do you identify which two items should be paired?

  • @mindworkshr

    @mindworkshr

    3 жыл бұрын

    @@ashtonfei mine is a dyadic study in an organisation. So i have to collect data on pair of team member and team leader.. so is there a possibility that I link two forms ? Like first the form will be filled in by member and he should pass a separate set of questions in a different from to leader.. so is there a possibility ?

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    Will the questions in the leaders for be different ( according to the responses from the team members' form)? I need to understand a little bit more about your process.

  • @mindworkshr

    @mindworkshr

    3 жыл бұрын

    @@ashtonfei yes the questionnaire for leader and followers are different.

  • @ashtonfei

    @ashtonfei

    3 жыл бұрын

    I understand there are two different forms. What I want to know is the form itself. Are they always have the same questions? Not dynamic questions depends on different responses from another form.

  • @PhysicsAddhyan
    @PhysicsAddhyan4 жыл бұрын

    First let me thank you for this amazing tutorial. I was exactly looking for this for last 2 days and ended up here. Can you help me to figure out this ? I wish to use this uid generation as a sign in process for my users. i want only those student who have this uid code can have access to my other google google forms. I wisht o use this

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    I don’t think it’s possible in google form, you need to build a customized form to meet this special requirements.

  • @PhysicsAddhyan

    @PhysicsAddhyan

    4 жыл бұрын

    @@ashtonfei thank you for your suggestion..

  • @kalyanchavan3430
    @kalyanchavan34304 жыл бұрын

    good work bro can we send this auto id to the submitter if we collect the email id instead of their names how to do it

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    Yes, of course we can do that.

  • @kalyanchavan3430

    @kalyanchavan3430

    4 жыл бұрын

    @@ashtonfei thanks for your reply can you guide me in doing that as it is required me for feedback form in my college and i am not from computer background thank you

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    Can you create a form and share it with me? I will add the script in it for you.

  • @kalyanchavan3430

    @kalyanchavan3430

    4 жыл бұрын

    @@ashtonfei Thank you for your reply i will create it soon and share it with you within one or two days can i send that form on your gmail mentioned below your you tube video?

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    Okay. I think I can make a sample for you, but please share your email with me.

  • @rbl1582
    @rbl15824 жыл бұрын

    Hey, I want to change uid email subject line to person's name in the form. please help me out in this

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    Can you share your file with me? I will update the code there.

  • @rbl1582

    @rbl1582

    4 жыл бұрын

    @@ashtonfei Here is the link: docs.google.com/spreadsheets/d/1ZiclmgR2iyU3dcGm75Wys4NKu84W_ZoWMyGU7fGvGcM/edit?usp=sharing . Thank you soo much for your help.

  • @rbl1582

    @rbl1582

    4 жыл бұрын

    @@ashtonfei Please Change UID Email Subject line to UID + Email Subject line mentioned in sheet.

  • @ashtonfei

    @ashtonfei

    4 жыл бұрын

    @@rbl1582 Did you share the file with me?

  • @rbl1582

    @rbl1582

    4 жыл бұрын

    @@ashtonfei Already Shared here is link: docs.google.com/spreadsheets/d/1ZiclmgR2iyU3dcGm75Wys4NKu84W_ZoWMyGU7fGvGcM/edit?usp=sharing

  • @yurabrazhnikov
    @yurabrazhnikov5 жыл бұрын

    Please! How to create Auto Id for google forms? Not Random

  • @ashtonfei

    @ashtonfei

    5 жыл бұрын

    for sequential id, you don’t have to use Script. A array formula can solve the issue.

  • @ashtonfei

    @ashtonfei

    5 жыл бұрын

    Please enter this formula to the first row of the column where you need the sequential id. Here is an example to add id to column H, paste it to cell H1. Change the reference if you need the id in other columns. =ARRAYFORMULA(IF((A:A)"",IF(ROW(H:H)=1,"ID","ID" & ROW(H:H)+9999),""))

  • @markcomTVChannel

    @markcomTVChannel

    5 жыл бұрын

    THANKS dude! i helps!

  • @inglobetr

    @inglobetr

    4 жыл бұрын

    @@ashtonfei Not works for me..

  • @easylearnhacker8190
    @easylearnhacker81905 жыл бұрын

    hello brother i faced another problem. Can you help me?

  • @easylearnhacker8190

    @easylearnhacker8190

    5 жыл бұрын

    docs.google.com/spreadsheets/d/1DF0-DyA0l7QqrvZkAIrwIkrcUB1Rm_ls_8Q8rqUQCuc/edit?usp=sharing

  • @easylearnhacker8190

    @easylearnhacker8190

    5 жыл бұрын

    docs.google.com/forms/d/1DSPeVWAI2n-SkkK1XGMyjFBjyzUgjMbz37vVqLG_uY8/edit?ts=5b9950fa

  • @ashtonfei

    @ashtonfei

    5 жыл бұрын

    EasyLearn Hacker sure, please send the issue to me

  • @easylearnhacker8190

    @easylearnhacker8190

    5 жыл бұрын

    please give me your mail , i want to share with you this link, create same problem

  • @easylearnhacker8190

    @easylearnhacker8190

    5 жыл бұрын

    TypeError: Cannot call method "getDataRange" of null. (line 6, file "Code")