Easy Data Entry: Enter Data Using a Form in Google Sheets & Apps Script
Вставка
- Опубліковано 5 вер 2024
- Here's a quick video demoing using Google Apps Script to save data from a simple form in Google Sheets to a table/database format in a different tab.
If you want to take this concept to the next level, check out our Part 2 video here, which covers adding update/retrieve/delete functionality: • Make CRUD Easy! Manage...
Or if you want a mobile-friendly solution or one that will work for anyone without having to authorize the script, check out this alternate tutorial here: • Easy Data Entry in Goo...
You can make a copy of the Google Sheet used in the video here:
bit.ly/3W1vveT
This code is very short and sweet thank you. The only thing I had to change in the script was to write "form" in lowercase instead of "Form", and it all worked smoothly.
Awesome, thanks for sharing!
OMG FINALLY ❤THIS IS EXACTLY WHAT I WAS LOOKING FOR. ✨🙏 THANK YOU
Awesome, glad I was able to help! I love the simple solutions.
Thanks for your great tutorial! It's really helpful! By the way it doesn't work on Android phones, right? What can we do for Android phones?
I just made a new version of this video using an onEdit script, which makes this functionality available for mobile phones or tablets: ua-cam.com/video/K5uOSI5i8ME/v-deo.html
Is there a way that multiple users can use the form simultaneously without interfering with each other?
You can duplicate the form entry tab and have a separate tab for each user. Then in the script you can just use an or statement for the tab name.
E.g.
If ((tabName == 'Form 1' || tabName == 'Form 2' || tabName == 'Form 3') && val == 'Submit')
very short and efficient code thankyou
Glad it was helpful!
My head hurts from trying to understand but thank you for this.
It gets easier! You can make a copy of the final project and play around with it to learn more, and if you break it, you can go back to the original again. 😉
hey i get the exception that my parameters for the getrange function are (number,number,number,null)
It sounds like you might need to update the range where the script is getting the data. If it's saying the last one is null then the script is likely not getting any data. If your "FORM" tab looks different than the FORM tab in the template, you will want to modify the range where it's getting the data. That is this line:
let data = form.getRange(5,5,form.getLastRow()-4,1).getValues().flat();
This assumes that the data entry is starting in E5. If you are starting in B2, then you would need to modify to:
let data = form.getRange(2,2,form.getLastRow()-1,1).getValues().flat();
do you have a video about data entry that can also retrieve the data and update it on the same field? like the excel forms?
btw, your codes are the very short and easy to understand. thanks! ^_^
I just recorded a part 2 for this video that includes save/update/retrieve/delete functionality. ua-cam.com/video/hZSP1C1RWtM/v-deo.html