Data: add a new row to another table (3 tables case: many to many)

For the porpuse of adding grades to our students, I have 3 tables related:
Test, studentsTest(here goes the grades) and Students
They are related as many to many. In the studentsTest table I have 4 columns: studentsTest ID, Test ID, Student ID and grades
So it works like this: when i create a new Test (with name, date, subject, type), after I save it i can see in the Test details view a related testStudents (child? or nested table? i am not sure) and there I can Add rows for the studentTest, basically add student and his grade for that test. To be more specifc I get the Test ID from the test i just created, and i can select a student ID by its name (the student table has “names” as label) and finally add a score for him and save. It works fine but i must select one by one to add the students names and scores.
So I need that after a test is created, the column for Student ID (in the Related studentTest) should be populated with all the students (one per row) leaving the grade field blank for later be quickedited. (When the related testStudents is populated its great for quickediting because it resembles an excel sheet wich is very convenient for this porpuse)

I tried the action Data: add a new row to another table but it seems it is meant to work initially with 2 tables only, as in the sample for this with employees and proyect table. I dont uneerstand how could i link the three tables in the action. Any help would be apreciated. Thanks (The name in the picture Related Alumnos Nota is the one i referred ad “testStudents”


I’m not sure that I have understood the issue you are facing completely, but my impression is that if I were trying to do what you want to do I would want to put all of the data in one table, not spread it out over three. It is much easier in AppSheet to split up data that is all in one table (one can use slice to do this) than to put data in multiple tables together. I have written about this here:

If you have all of your data in one table, then I think it should be fairly easier to configure your app so that your can use “quick edit” to type in the numbers in the table. I’ve written a little about this here (see “7. Does “quick edit” work in table view?”):

2 Likes

Thanks for your answer. I was working like that before, one table only, but when i created a new test i had to put the test data on each row (subject, name, date…), later, i start using the previus entry as the initial value but still, if I have two or more teachers putting grades it would get messy, maybe there is something i am missing so i will give it a shot once again, may be like you mention the key is in the UX views. I will read your post and give it a try.

1 Like

Good luck! I’m not sure what the best solution is but I hope you can find a solution that works well.