Google Forms question based on previous choice - google-apps-script

I am collecting data from my students. I have their names, classrooms and attendee's numbers in a Google Spreadsheet.
I want to have a Google Forms where first they put their classroom (drop-down list). Then, they have to put their number (drop-down list). However, the number of options in this second question is not all the same. Each classroom has different number of students. So, the number of options for the second question is based on the first choice.
For the third question, I want them to put their name. To avoid them putting different name from what I have, I decided to put a drop-down list where the only available choice is their name (based on the answer of questions 1 and 2).
Is there a way to access the choices of previous questions before submitting them in order to determine the options for next questions?
For example, when the answer for first question is "A", there will be only four option for second question i.e. numbers 1-4. And, when the answer for this question is 4, then the only option for third question is "Doug".
I have tried using sections. But it will require so much works because there are more than 200 students in 16 classrooms. I tried using pre-filled forms (generating url for each students). This will require so much works too. Is there a way to access current response (not the last one) and use it to determine the next question's options? Thanks for the help.

Related

Google Data Studio visualize data by frequency of the value

I have a very simple quiz like app which is basically a question and answer. I want to common mistakes of the user i.e. on which question user is making mistake most of the time. For that I have custom event which logs an event every-time a user answers a question wrong. So if there are 5 questions and user usually answers question 3 wrong than the common mistake for that user is question 3.
But in data studio I am not able to find any formula which gets the number of frequency of event value from the big query data-sets. I am looking for a way to implement this any help would be appreciated.
I am using firebase custom events which is linked to bigquery.
Do you want the output of the table to show the Questions on the left, Frequency on the right?
Or you want the output of the table to show the Users on the left, Questions (common mistakes) on the right?
For the first type, create a table, set Question as dimension, Record Counts as a metric.
For the second type, you can create a pivot table. set User as row, Questions as column, Record Counts as the metric

GoogleSheets - How to A-Z Sort Data Pulled by (Filter(Importrange

Here is a link to my sheet. https://docs.google.com/spreadsheets/d/113PRiJKxz_fIPmIoPID5e2IzrZF9ZptslX06JbIatDE/edit?usp=sharing
I am currently attempting to sort data pulled from another sheet into the one linked above by using filter(importrange.
What I have is a list of websites(Col2) with associated data points pulled in different adjacent columns. I have pulled a list of websites into this sheet using filter(importrange.
I have then pulled all associated data points (13 per website) from the other sheet also using filter(importrange, but making the criteria based upon matching the website within this new sheet to websites within the original list.
The idea is to pull all websites and corresponding data points that meet a certain criteria, in this case all websites that contain the ad network "Content.ad".
I have achieved this but now I am wondering how I will be able to sort this data in the new sheet where the data is being filtered into.
I would like to have the ability to sort the list of websites A-Z based upon the different data points, while having each column rearrange so that each data point remains with its associated website while being sorted.
For example if I want to sort the list from A-Z by Traffic Volume, I would like all data points to sort according to the position of their associate website.
Apologies if I have explained this inadequately.
Any help greatly appreciated.

School Detention Tracker in Google Sheets

I am trying to make a spreadsheet for the Deans at my school to track student detentions. They aren't that great with technology so I want to make it as simple for them to use as possible.
Here is a link to the current layout: https://docs.google.com/spreadsheets/d/1FIW0QAWGStgdUmYU0rWAceWI-YvjM1RIIC_KC2OeWWI/edit#gid=0
It would have a row for every student in the school and use different columns to record when students received a detention and whether or not it has been served yet. I created a formula to check how many unserved detentions each student has so that the deans can easily sort for who needs to serve detention that day.
I want some help creating two scripts:
A button that the deans can click to assign a student a detention. It would need to find the next available empty cell on that row, input the current date, then find the next available empty cell and write "Issued"
A button that the deans can click to mark that student's detentions as served. It would need to find and replace all instances of the word "Issued" on that row with "Served"
Ideal dean workflow:
Issuing a detention - Find the student on the list and click the "Issue" detention button
Running detention - Find the student on the list and click the "Served" button
Meeting with a parent/looking over records later in the year - Find student on the list and scroll horizontally to view dates of all detentions earned that year.
Potential snags:
One of our deans already sheared a spreadsheet trying to sort it. Is there a way I can reduce this risk while still giving him the ability to sort by student name and number of unserved detentions as neccesary?
Here are a few workarounds in lieu of a macro:
To input date > ctrl + semicolon, or command + semicolon on macs. This will enter the current date in the cell.
Use the =countif formula to keep an easily sortable tally on number of detentions a student has been assigned and served
An if statement can let you know that, if the total count assigned vs. total count served do not match, then a student still has a pending detention.
I also recommend keeping a "viewer" tab that your dean uses and the actual area where people are recording the data separate. That way the dean can sort and manipulate your data without actually affecting the original entries.

Grade multiple forms on one spreadsheet

I need to grade some google forms. Due to the way I needed it to work, I used one form for every question on the'quiz'. Not every person will have taken the same question. The responses are recorded into spreadsheets, but google makes each form have it's on sheet on the same document. So, because of the random questions, it make's it harder to grade. Some users may have all taken question 1, while only a couple have taken question 2. The names won't be in order, either, if they took the quiz at different times. So how can I grade this? There's about 40 questions total. I'm thinking I'll need to use google app script, but I'm not sure how.
Spreadsheet
This shouldn't be to hard to do but might be a bit complicated to explain here...
What I would do :
get all data from each page into an array
add the question and the right answer in front of every user answer for each array row (page)
concatenate all the arrays into one global array
sort it on user Name and get a new array for each and every user
sort all these arrays on question (it would probably be nice to add numbers to these question if you want to control the order of the questions)
evaluate the user answers (easy since you have both the right answer and the user's answer in each row)
write back to a spreadsheet, eventually one sheet / user
Nothing really hard to do but a lot of work though ;-)
Good luck

How to make a single Access form create multiple records

I'm relatively new in using Access.
I'm creating a database for questions and answers. Answers are stored in the answertable with the following fields: timestamp, question id, answer text, person id. Each record only contains one answer.
Now, I'm looking for a way that lets me update/enter multiple records at the same time. For instance, the person using the form should be able to fill all respondent's answers, then hit submit. If there were five questions, the result should be five records with only the field 'answer text' differing from the other four.
I've searched on Stackoverflow but the only solutions that are given are in RoR. I'm experienced in VBA, but that's it.
Any help would be greatly appreciated. Thanks.
Your main form should be bound to the table that has one record per person. On that form you can add a subform (default view datasheet) that is bound to the table that has one record per question. You will want to set the link between the main form and the subform to be on person id.
Once you have the subform, you can hide the person id and question id fields.
Before you open the form, you will need to run a query to make sure that all the required questions that the person should answer are already added to the answer table, populating both person id and question id.
You may want to adjust the datasource of the subform to include the question text by linking to the table that is keyed on question id.
Well, if a question should have only one answer, and an answer should have olnly a question, why are they in different tables?
But, if your question table should have more than one answer, its ok.
You cannot edit multiple records in MS-Access in same time. You must to implement a form in GridView mode, wich will retrieve the desired questions, or allow user to add records on it. When user edits all the rows, the user should click a button wich will startup a process that will read the gridView and update the table, one by one.
The smartest way ought to be create a form in gridView mode, linking it to the answer table. Then filter the data presentagion on this form to fit in your desired params. When the user edits an answer presented, this row will be automatically updated in table.
I disagree with your fundamental UI question. One question and one answer on a form.