Store changing data to a date in google spreadsheets - google-apps-script

Here's the spreadsheet I'm working on so that it serves the purpose of keeping track of my goals --> Link
I'd like to display the data in a graph like the "Test Graph" page shows. I would need a function to check for any updates in the "Goals" page and display it like in the "Test Data" page. I'm a beginner and I don't know how to write Google App Script, I've tried with spreadsheet functions but didn't manage.
Thank you very much! Feel free to download the spreadsheet if you find it useful for you too!

Related

Sync Google Sheets with Web Page HTML

What is the easiest way I can sync a sync a google sheet with a web page form (see attached picture)? Ideally an example code or tutorial.
Here is what I want: I want users to access my web page so they can select their name from a drop-down menu and put it next to the item they wish. Then once they click submit, each person's name value will be transferred from the webpage and then recorded into the corresponding cell inside the google spreadsheet. Then when the next user comes to the site, the fields will auto-populate from the google sheet so he will see who has picked what and what choices are left.
Ideally I would just send the users directly to the google sheet to make their selections, however, they can't edit it on a mobile phone without d/l the app and a bunch of other bogus roadblocks. Google Forms also does not work for this for several reasons.
Some things to keep in mind:
- the spreadsheet is totally public and editable. So I'm hoping to avoid the need to set up an API
- no security or login necessary for the users (I am not worried about if someone changes someone else's name)
I have spent weeks trying to find how to do this but I'm just a construction worker I don't know technology
SYNCING HTML FORM WITH GOOGLE SHEET
From Tanaike,
If you can use the web page as Web Apps of Google, I think that it can achieve what
you want using Google Apps Script, and you can get and put the values
of Spreadsheet. In this case, the Spreadsheet is not required to be
published. The document of Web Apps is [can be found in comments].
– Tanaike 10/19/2018

SelectBox in Google Script?

I am a little bit new to Google Script so apologies if my question is silly. I have the following user scenario:
- on a monthly basis I get standard file from on of my departments
- I save the file on Google Drive and automatically copy certain information to my Sheets that I use to analyse this information
- I finished the code that does the copy, selection, etc.
I am struggling with the first piece - some sort of SelectBox that I would use to select source file. I can write code that will search Google Drive and display potential files, display them in ListBox, but maybe there is other way (the simpler the better). What would you recommend here?
Google has nice Box that shows up when you try to copy sheet into other Sheets document, but it seems not to be avaialble for Script.
Any help is much appreciated.

Google Form Confirmation Page with a Button to Create a Report, via Browser Access

I have created a Google Form. From the Confirmation page I would like to create a button that says "See Test Score". At that point I want to create a report of sorts, accessible via a browser, using apps script. The report would access data from a Google Spreadsheet via apps script. I just need to figure out a way to create the report. The report data will mostly be in table format but I may want to add a graph or two. Any help would be appreciated! Thank you!
You cannot do this using a Google Form. However, what you can do is write a UI using Google Apps Script which has the same fields as your form. You can customize this UI a lot more where you can show a report on the confirmation screen etc.
I suggest you go through the Google Apps Script tutorials and start writing your UI. If you get stuck or need help, come back with the issue you're facing

Use a Google Docs Spreadsheet as a datasource for a dynamic Google Sites webpage

I have a Google Form that feeds a Google Docs Spreadsheet. I'd like to--in turn--have that Google Docs Spreadsheet feed a webpage.
In plainer English, babysitters fill out the form to sign up to be in our community's Babysitter Directory. The spreadsheet houses all of the data. I'd like to code a webpage to pull selected bits of the data for the online directory.
I've tried doing a separate sheet in the spreadsheet, using a QUERY to select the columns that I want to include (and the order in which I want to include them), publishing that sheet to the web, then embedding that sheet into the webpage in an iFrame. And that works.
But even with the QUERY, there are SO many columns that users need to scroll WAY over to the right to see all the data for each babysitter. It's unwieldy.
What would be way better would be if I could break the data for each entry over multiple lines and do some nice formatting for a directory, rather than just a linear spreadsheet. So that, essentially, each babysitter's "entry" in the directory is more than 1 line long. Does that make sense?
If I was working in Office, I would know exactly what to do: use the Excel spreadsheet as the datasource for a Word Mail Merge and I would put move the fields around on the page to make it all look good.
And, to be sure, if I can do this in a Google Doc, then embed the Doc into the webpage, that's fine, too. But I would think there's some way I can do it directly in the Google Site?
Can I?
If anybody has even just a reference page for me to take a look at, I'd appreciate it.
Thanks!
Are you trying to do this in Google Sites? If so, you can embed the entire spreadsheet on the page, but if you only want certain columns, you can try inserting an Apps Script widget on the page.
You need to know how to write a Google Apps Script that will run JS functions and render HTML, here is a tutorial
To create the Script that can run on your page, go to:
More > Manage site > Apps Script > Add new script
Here's also a link to how to interact with Spreadsheet data.
What you want to do is more or less a database interface that uses a spreadsheet as 'data holder', depending on your programming skills it can be quite easy or very hard...
Here is an example of such a webapp, its has probably too many fields and features but the general idea is the same (a quick search tool and a window to show results).
It that what you had in mind ?
If so I can share the code to help you to get started but if you are not familiar with javascript it will probably need too much effort to get through.

Example display of Google Spreadsheet data in Google site via Google Apps Script

I see that some people are trying to grab data from google spreadsheets via google apps script to stick in their google sites:
How to access data on different Google Spreadsheet through Google Apps Script?
I could bash away at code snippets, but I don't suppose anyone has got a working example anywhere?
Many thanks in advance
I was looking for something like this:
https://sites.google.com/site/testappscript2/
At the moment I don't think you'll see anything if you are not logged in to Google, but if you are then it might show this:
Welcome, don't know your name, but if you add your details here: https://docs.google.com/spreadsheet/ccc?key=0Aq72y9iq5_1UdG5LR0tCVTRXOVQtbkNLR1Q3eE5MR0E#gid=0
I could tell you your next assignment
if your google mail is in the spreadsheet it will show a personalized message.
My idea is to manage what a student sees in a Google site for a course depending on how the instructor has updated the students data in an online spreadsheet, so the student can see which assignments they've completed - what they have to do next, and possibly even their grades ...