Button with script to populate table
 
    Hi. I have a database as per the model in the picture.
1. Table with students.
2. Table with classes. Each class has a table of students (3) picked up from 1.
3. Table with assignments. For each assignment there is a table with the classes that were given that assignment (5).
I wanted a button that would automatically populate 6 with all the students that belong to the classes in table 5.
9 replies
- 
  1) just to be clear, you have reference fields in table 6 that links to table 4 and 5 separately? or is Table 6 a child of table 5? 2) Where will this button sit? Table 4 or Table 5? 
- 
  6. List of Students... is not a table but a view that uses the existing structure. So create a view in the 4. Assignments table with this formula '5. Classes with Assignments'.'2. Classes'.'3. Students per Class'And then in Edit columns put the Name of the student. If you need a unique list then group them together. 
- 
  Or: unique('5. Classes with Assignment'.'2. Classes'.'3. Students per Class'.'1. Students')
- 
  Hi working as it should, thank you. I think it might have been a column formula that threw it, as you said. Maybe I was trying too hard to beat to an answer and rushed it! 
Content aside
- 1 yr agoLast active
- 9Replies
- 96Views
- 
    4
    Following
    
