Automated Data Entry Form in Google Sheet & Google Apps Script - Part 2 (Search Function)

Поділитися
Вставка
  • Опубліковано 12 вер 2024

КОМЕНТАРІ • 108

  • @emilylandis5832
    @emilylandis5832 Рік тому +4

    For anyone struggling to get the search function to work, there's a small error in the last if statement - should be if(valuesFound == false) { ... } (the 2nd = is missing in the original code). When I fixed that, the code started working for me. (To clarify, the function was working when there was a match but I was having trouble getting the false case to work and give the alert to the user that no records were found.)

    • @user-fw8zq5mn8g
      @user-fw8zq5mn8g 11 місяців тому

      I have the same problem with you.. but when i tried to delete the record that appear from search, then I write a wrong / not match record. I got the error message

  • @phamhongvan6232
    @phamhongvan6232 2 роки тому +3

    Thanks so much for taking your time making this video. This is what I’m looking for 🙏🏻👌🏻 If possible, could you make a video on the search function which can search from multiple column? For example, there are 3 columns in the database sheet: name, phone number, email address; and if someone just type a partial match. Look forward to watching that video from you soon. Thanks.

  • @jijeeshpadmanabhan350
    @jijeeshpadmanabhan350 Рік тому +1

    The way you explained each step is very useful and interesting.

  • @profitrocketchannel
    @profitrocketchannel 2 роки тому +3

    For those of you getting a "Record not found" alert for each instance, make sure you have closed the loop before you write your IF statement for setting the alert... meaning close your if statement about the row values with one curly bracket } and then be sure to also close your FOR loop with a second curly bracket } before beginning your "if(valuesFound=false){" set. I also added code to clear the input values in the form if I had a false return.
    if (valuesFound==false){
    //code to clear user input
    shUserForm.getRange("C7").clear();
    shUserForm.getRange("C9").clear();
    shUserForm.getRange("C11").clear();
    shUserForm.getRange("C13").clear();
    shUserForm.getRange("C15").clear();
    shUserForm.getRange("C17").clear();
    //alert
    var ui=SpreadsheetApp.getUi();
    ui.alert("No record found.");
    }

    • @data.muncher
      @data.muncher Рік тому

      @hollybenedetto9256 i dont understand, which loop? still figuring out as the Record Not Found keep appearing.. can you enlighten please.

  • @yusufsharif9160
    @yusufsharif9160 3 роки тому +2

    Wooow this is best tutorial...just want to ask if i want to input salary records for every time i pay my employee every week..so its something that i have update data every week and keep records...please can you make a video...thank you

  • @ariffdaud5332
    @ariffdaud5332 Рік тому +2

    can we use date as id so we can seacrh any data by date its created?

  • @littleclover2334
    @littleclover2334 3 роки тому +1

    Nice video! Want to ask something sir. If the employee id is alphanumeric, is the search button be not case sensitive? Because when i tried it it only searches the same case used when you record the employee id in the database. Thanks in advance

  • @marchrian2512
    @marchrian2512 3 роки тому +1

    Thanks for sharing this video, my question is how if we need to upload picture for
    entry data?

  • @shermanscs
    @shermanscs Рік тому

    This is very good and helpful, but my issue is two people using this "form" at the same time. They will compete with each other on the data entry, no?

  • @wan5682
    @wan5682 2 роки тому +1

    for the Search function, how to make multi search option such as Cell A1 and Cell B1

  • @ranjangpengantin6300
    @ranjangpengantin6300 4 місяці тому

    Awesome. Can you help me with with automated data entry "Google Form" from Google Sheet please?

  • @dgrolfe
    @dgrolfe 4 місяці тому

    How does one do a partial search? For example, if I'm looking for "John Doe", I want to be able to type "John" or "Doe" to find the data... Also, if there are multiple "John"s in the database, I want to be able to type "John", then select from the list of "John"s....

  • @educationaltips7743
    @educationaltips7743 3 роки тому +1

    Well explained....😍

  • @pedrorevolorio6960
    @pedrorevolorio6960 3 роки тому +1

    Awesome videos! What about a partial search match? For example if a user searched "123" but the ID was "12345"?

  • @mohapatra007bisu
    @mohapatra007bisu 2 роки тому

    Hello Sir ....
    Hope you are doing well...
    I am very much thankful to you on sharing such tutorial with us... It is a great help to my company project... I have zero knowledge in JS coding... But after watching your video I am able to write code... Thank you for that....
    Sir could you make a tutorial video in this Google Form series about Dynamic Dependable drop down list (single level and multi level).
    Date of last entry of the customer (person) in search option...
    Please sir... 🙏🙏🙏
    Also the way you explaining things is really remarkable.... So could you please make a complete tutorial series of videos from Beginner level to Expert level for Google App Script.... Please....
    If you are providing any online class then please let me know... I would like to join that as well... Thank you Sir....

  • @pematenzin166
    @pematenzin166 Рік тому

    Hello "TheDataLabs", i have been seeing our videos and have been helping me a lot but however i need your help further. It is in regard to the submit button since the data is saving it self when hitting no button instead of clear the contents...Would be great if you can teach me that.

  • @mohammadhasnain313
    @mohammadhasnain313 2 роки тому

    Thanks for the amazing tutorial! Is there any way to add a next button which goes to the next entry in the database with the same employee id (Asking incase we do double entry of the data)

  • @salinrajkunnummal8018
    @salinrajkunnummal8018 2 роки тому

    Well Explained.... Thanks a lot

  • @ecolemontessori7102
    @ecolemontessori7102 3 роки тому

    Thanks for tutorial, very useful

  • @user-ce7vv4fh3r
    @user-ce7vv4fh3r 7 місяців тому

    On my end after the first search the search function stops working. What could be the problem? thank you.

  • @richardrose8453
    @richardrose8453 Рік тому

    are you selling services to make this?? I want the search function only

  • @user-et5dw9xc7e
    @user-et5dw9xc7e 7 місяців тому

    Good job

    • @thedatalabs
      @thedatalabs  7 місяців тому

      Thanks for your feedback!

  • @yogeshbco8049
    @yogeshbco8049 Рік тому

    How can a write function or is there anyother way, which will throw alert messages if all the details are not filled in entry in employee data form.

  • @jeanlexcabayao
    @jeanlexcabayao 8 місяців тому

    please help me may search record is has problem they said my googlesheet get Sheet By Name is not a fuction what I will do.

  • @fbestchannel7919
    @fbestchannel7919 3 роки тому

    Thanks for useful tutorial. can u please teach me how to deploy this App Script As a WebApp. when i try to deploy it and just error come out with no "doGet" and blank page

  • @ManpreetSingh-dl6og
    @ManpreetSingh-dl6og 2 роки тому

    What can use multiple users in this programming????

  • @seniordom5278
    @seniordom5278 Рік тому

    I want to add two condition for for search option. please guide.

  • @findingidentity
    @findingidentity 2 роки тому

    How to trigger an email notification for the same as soon as a user submits the form with all the details submitted by the user?

  • @Aaron-xn9ym
    @Aaron-xn9ym Рік тому

    Could you please amend this to include how to set up the html page, and the "doGet" code? I spent a day and a half following this to the letter, and can't deploy it because of the doGet error. I've spent the other half of today researching this, and can't get it right.
    Also, when searching, no alert is given stating "No data found", it just does nothing.
    EDIT: Fixed. Alert being given now. My code had 1 equal sign, needed 2. if(valuesFound==false)

  • @adityanaufalghifari9112
    @adityanaufalghifari9112 2 роки тому

    How if we want search with 2 criteria (ex: i want search sales product a in 1 January 2020)

  • @thaigentcompany1044
    @thaigentcompany1044 2 роки тому

    Can I use name to search instead of number

  • @mohdillyas4899
    @mohdillyas4899 2 роки тому

    When I write the script for search function it is giving I'd is I'd for first name as 1 last name as 2 etc please help where is mistake I used your same script

  • @elvicendzi9297
    @elvicendzi9297 3 роки тому

    Please sir i have a serious problem. when every i tried to inset a new record it some give an error {Method ' _Default ' of object 'Range' failed

  • @meakkakda514
    @meakkakda514 3 роки тому

    Pls make video How to create button insert photo

  • @jacquilynramilo4711
    @jacquilynramilo4711 Рік тому +1

    i follow every step but still, i get the error of Record not Found

    • @user-hs1cr5ub6n
      @user-hs1cr5ub6n 5 місяців тому

      var myGoogleSheet=SpreadsheetApp.getActiveSpreadsheet(); //declare a variable and set with active google sheet
      var shUserForm=myGoogleSheet.getSheetByName("User Form"); //declare a variable and set with the User Form worksheet
      var datasheet=myGoogleSheet.getSheetByName("DataBase"); //declare a variable and set with the DataBase worksheet
      var str=shUserForm.getRange("C4").getValue();
      var values=datasheet.getDataRange().getValues();
      var valuesFound=false; //variable to store boolean value
      for (var i=0; i

  • @mamasusan3992
    @mamasusan3992 Рік тому

    I only get “Finish script” when I press search. How to proceed?

  • @admercs762
    @admercs762 2 роки тому

    How do I find 2 different sheets of data?

  • @ravshanrakhmatullaev6731
    @ravshanrakhmatullaev6731 3 роки тому

    H sir. I have a question. if there is a sentense "finished script" i presses search button, what should i do? It is not looking for available data

    • @mamasusan3992
      @mamasusan3992 Рік тому

      i have the same question. I hope you still remember the answer to this 😂

  • @sirfondeck651
    @sirfondeck651 3 роки тому +1

    thanks Sir
    I follow the steps but got an error that 'values is not a function'

  • @zeeshanpasha-bz5xu
    @zeeshanpasha-bz5xu Рік тому

    buttons are not clickeble on google sheets mobile

  • @only1guidecom305
    @only1guidecom305 2 роки тому +1

    why my search fuction code not working? here is the code i am using- //Function to Search the record

    function searchRecord(){


    //declare a variable and set with active google Sheet

    var myGoogleSheet=SpreadsheetApp.getActiveSpreadsheet( );

    //declare a variable and set with the user form reference

    var shUserForm=myGoogleSheet.getSheetByName("User Form");

    //declare a variable and set the reference of Database sheet

    var datasheet=myGooglSheet.getSheetByName("Database");

    var str=shUserForm.getRange("C4").getValue();

    //getting the entire values from the used range and assigning it to values variable

    var values=datasheet.getDataRange().getValues();

    var valuesFound=false; //variable to store boolean value


    for (var i=0; i

    • @danielcoello1146
      @danielcoello1146 5 місяців тому

      In the line "var str=shUserForm.getRange("C4").getValue();" its ".getValues();" without the s it's not going to search for the data

  • @tayyabzohaib63
    @tayyabzohaib63 Рік тому

    Only if you would have added image to the form, it would have been very much helpful.

  • @educationvilla
    @educationvilla 2 роки тому

    I have to run script thrice because I have 2 dependent drop downs

  • @AnaMariaStoi
    @AnaMariaStoi 2 роки тому

    one of the errors is with var ui: undefined. How to fix this? I am noob

  • @IvanEng747
    @IvanEng747 3 роки тому

    If strings is more than one(on database), script does not work(

  • @uctrongvu9408
    @uctrongvu9408 3 роки тому +1

    your code run but it didn't show the results :V

  • @Andiszamm
    @Andiszamm Рік тому

    Data Not Found
    Please help me the solution sir

  • @archanapatil3358
    @archanapatil3358 3 роки тому

    I tried this same bt showing the error for response..

  • @johnloisbanez4746
    @johnloisbanez4746 2 роки тому

    Hi, I've made a data entry form using this tutorial. There are instances that ID will be the same for different entries, how can I make the "search function" search the next records with the same ID?
    Thank you.

  • @ORMINEMPLOYMENTFACILITATIONOO1
    @ORMINEMPLOYMENTFACILITATIONOO1 2 місяці тому

    SEARCH function did not work

  • @vedavalli9745
    @vedavalli9745 Рік тому

    can any of u get me search... it's not working for me..

  • @miyagenco.ltd.3100
    @miyagenco.ltd.3100 3 роки тому +3

    Search function not working

  • @sonupatelstudyhi9303
    @sonupatelstudyhi9303 2 роки тому

    My sheet is not working

  • @Vavgamefmindia
    @Vavgamefmindia Рік тому

    what is your nu ?

  • @62135134
    @62135134 3 роки тому +2

    when i set the valuesFound to false at the bottom for the alert it is not working, but when i set it to true it is now working. hmmm, im confused

    • @RakeshSingh-yd7xo
      @RakeshSingh-yd7xo 3 роки тому +1

      I am also facing the same issue and he has not covered this part in the video so please help with this.

    • @laurawilliams8852
      @laurawilliams8852 Рік тому

      This comment. You are my hero!!!!!!!!!!!!!!!!

    • @enriicochiiesa5022
      @enriicochiiesa5022 Місяць тому

      how to solve sir ?

  • @solartechdocument419
    @solartechdocument419 3 роки тому

    How to open a google sheet using google apps script?

  • @neildelgado3054
    @neildelgado3054 3 роки тому

    The script you provided in your website for search, delete, and edit functions are for VBA.

    • @thedatalabs
      @thedatalabs  3 роки тому

      It's for Google Apps Script. Thanks!

    • @neildelgado3054
      @neildelgado3054 3 роки тому

      @@thedatalabs but it doesn't work. I just followed the one you typed in the video.

    • @neildelgado3054
      @neildelgado3054 3 роки тому +1

      @@thedatalabs There are few things that I'd like to ask regarding the script you made.
      1. In the submitData(), why did you use the clear() instead of clearContent()? The latter won't reset the formatting of the cells and it will save you the trouble of typing the code of bringing it back to the original formatting,
      2. In the submitData(), is there a way to prevent duplicity of data entry? As when you use, the search function the data encoder may accidentally click the save button and would duplicate the entry shown in the user form.
      3. In the searchRecord(), you did not test the script when the entry is false. As when the data entry is false, the UI dialog just says the script is finished.

    • @umarhakimin
      @umarhakimin 3 роки тому

      @@neildelgado3054 Thank you for tips number 1

  • @user-dn4yz3xe1t
    @user-dn4yz3xe1t 3 роки тому

    Good tutoral but there is an error on the row coding

    • @AnkitKumar-bk7ik
      @AnkitKumar-bk7ik 3 роки тому

      can you please share where's the error

    • @AnkitKumar-bk7ik
      @AnkitKumar-bk7ik 3 роки тому

      I'm having trouble with the search function

    • @only1guidecom305
      @only1guidecom305 2 роки тому

      @@AnkitKumar-bk7ik me two
      ,is there any solution

    • @AnkitKumar-bk7ik
      @AnkitKumar-bk7ik Рік тому

      @@only1guidecom305
      Use Below Code:-
      function searchStr() {

      var ss = SpreadsheetApp.getActiveSpreadsheet();
      var formSS = ss.getSheetByName("Form1"); //Form Sheet

      var str = formSS.getRange("C4").getValue();
      var values = ss.getSheetByName(SPREADSHEET_NAME).getDataRange().getValues();
      for (var i = 0; i < values.length; i++) {
      var row = values[i];
      if (row[SEARCH_COL_IDX] == str) {


      formSS.getRange("C7").setValue(row[0]) ;
      formSS.getRange("C9").setValue(row[1]);
      formSS.getRange("C11").setValue(row[2]);
      formSS.getRange("E7").setValue(row[3]);
      formSS.getRange("E9").setValue(row[4]);
      formSS.getRange("C13").setValue(row[5]);
      formSS.getRange("C19").setValue(row[6]);


      return row[RETURN_COL_IDX];

      }
      }
      }

  • @AnkitKumar-bk7ik
    @AnkitKumar-bk7ik 3 роки тому

    search not working there is an error in the script

    • @IvanEng747
      @IvanEng747 3 роки тому

      Error on site.
      Do as in the video.

    • @mont9150
      @mont9150 2 роки тому

      @@IvanEng747 what?

  • @jojoafable2755
    @jojoafable2755 2 роки тому

    Not working

  • @educationvilla
    @educationvilla 2 роки тому

    Please help me

  • @mont9150
    @mont9150 2 роки тому

    "Script function searchRecord does not found". Dang I thought you are sifu but you left us cliffhanging like this.

    • @mont9150
      @mont9150 2 роки тому

      I found it guys, make sure every function(){ } has its ending. like {....................} make sure that. thats solve my problem. done amigos

  • @anamikasatyam1096
    @anamikasatyam1096 3 роки тому

    What is your typing speed bro?

  • @zucbsivrtcpegapjzwrf2056
    @zucbsivrtcpegapjzwrf2056 2 роки тому

    text

  • @koungsareth8623
    @koungsareth8623 3 роки тому

    Too small to see.

  • @noemimesesan1054
    @noemimesesan1054 2 роки тому

    There are so many comments from people saying it's not working is unbelievable that he doesn't even try to reply and help. You made a useless video for so many people and you don't care to make another video to sort the issue. I followed everything step by step and it doesn't work. If I set valueFound=true; it will give me the alert of No record found even if there is record. If I set it to valueFound=false; it will run the script and not give me any alert even if there isn't a record. I don't get it, sometimes it finds the record, other times it doesn't, but it doesn't give me any error, just runs the script without any alert and it doesn't even find the data I asked for (to mention that the data is present in the database sheet) If someone can help I would greatly appreciate it.

    • @Aaron-xn9ym
      @Aaron-xn9ym Рік тому

      I too do not see the message about "No data found" when searching for a non-existent record. I also cannot deploy the app, because I get the "doGet" error. I know that you have to have an html file along with the code file, but no one, and I mean no one can explain how to set up the "doGet" in plain english, and what to put in the html page.

  • @sanjayksharma102
    @sanjayksharma102 2 роки тому

    Please help I am getting error "Exception: The parameters (String) don't match the method signature for SpreadsheetApp.Sheet.getDataRange."

  • @mellacristobal445
    @mellacristobal445 2 роки тому

    There's an errror: TypeError: myGoogleSheet.getSheetByName is not a function PLEASE HELP

  • @harshitha.vk.h.venkatesh315

    There was a problem ,Showing ''I not defined? '' can you please help me with this.

  • @sonupatelstudyhi9303
    @sonupatelstudyhi9303 2 роки тому

    Not working