Can anyone help me write a Google App script for the Google Form I made?
In my form I have 4 questions. 1. Name, 2. Email, 3.
Phone Number, and 4. is Select Time for... But in the Form Responses 1 sheet the column for the answer for #4 I moved it to the second column next to the timestamp.
In number 4 I used a dropdown list for answers. Listing time from 8:00AM-12PM with 20
minutes interval. For example, 8:00 AM, 8:20 AM, 8:40 AM, and so on.
I created this form to serve as a booking form. What I want to happen is
I don't want people to have the same answer in question #4.
If they do, that means they can book at the same time.
Related
This is my first time asking a question so I apologize in advance for any lack of information,
I'm working on a timesheet for a friends company, the employees are labourers who wouldn't be reliable with a manual clock in/clock out app, they prefer a weekly submission of hours. So I have a basic google forms set up, and every week I want to display the last X (No. of employees) submissions in a separate sheet for the MD and accountant.
Format they come in from FORMS
Desired sheet + format to show MD
Is it possible to do this using google apps script? As I have a trigger script to clear this table every Tuesday, so ideally I would like a google apps script with a trigger to pull the last X rows on a Wednesday eve for the MD to approve and send to the accountant.
I was thinking of finding the last row on the forms response sheet, then pulling all other responses with the same date on the timestamp? So it would just be that weeks responses. I could have a simple count function for the responses then, so he would know if anyone hasn't submitted their hours.
Thanks in advance for any and all help and advice!
Tom
sheet.getRange(sheet.getLastRow() - x + 1, 1, x, sheet.getLastRow()).getValues()
I am currently working with health data and I wanted to create a visual on google studio that shows that amount of time a player missed due to each injury. However I am only able to show the total sum of the time missed due to an injury if a player suffered two of the same injuries. For example, a player suffered a knee injury in May that resulted in him missing 25 days. He then suffered another knee injury in July that resulted in him missing 15 days. The graph would show that he has missed 40 days due to a knee injury instead of Knee Injury 25 days, Knee Injury2 15 days. I believe the only way I can solve this issue is if I have a unique ID for each Injury. We currently update our google sheets through google forms. So I am wondering if there is a way to create an array formula of some sort that generate a unique ID when there is a value in the Injury column. If the Injury column is blank I want the ID column to be blank as well.
Any suggestions? I've looked into Google Script coding but having trouble with that.
Sorry for the lengthy post.
Thanks
-- Addition --
I am also hoping to have a bar graph show the data above. So for example I have the Player Name Column as a Dimension, the Injury Column as the Breakdown Dimension, and then some kind of calculated field that sums the Time Missed (Days) column by the Injury ID column.
You can use a custom formula like this:
function generate_ids(values) {
values = values.map(row=>row[0])
const ids = values.map(val=>[val?Utilities.getUuid():''])
return ids
}
Use the formula in your sheet as:
=generate_ids(A2:A)
If injury data is stored in column A starting from row 2, or adapt the range reference according to your sheet setup.
I'm not a very technical person when it comes to coding languages, but I'm trying to make a Google Form for my daily warm ups (I'm a teacher) that will update one text box with the date and the new question that corresponds to the date in a spreadsheet. My goal is to just add to the spreadsheet and the form will auto-populate the question for kids to answer.
I'm trying to create a volunteer signup form for a special needs program.
Aim of this form is to take a spreadsheet with the schedule information of riders and times for a given week and update the corresponding column for [Day, Student] with volunteer name.
Fields are
Volunteer name
Day
Student
A student has maximum of one class per Day.
Based on the day you select, I would like to give a set of Students for that Day. I want to populate the Student Choices based on the Day Selected.
A lot of the volunteering folks are not very adept at using computers so this seems to be the simplest way of capturing a volunteers interest for a given [Day, Student].
ItemResponse gives me a way of accessing the response to each question, can this be done in realtime while the form is being filled s the question.
Is this possible?
I'am going to test this soon but any pointers would be appreciated. Thanks
I am trying to record 2 times, start and finish, based on a pick list in 2 other columns. While I can get it to update the start time stamp, I cannot get it to stamp the finish time. The spreadsheet is here:
Link to spreadsheet
If anybody can see what I'm doing wrong, please feel free to point it out.