Forum Discussion

RuelYparraguirr's avatar
RuelYparraguirr
Qrew Trainee
6 years ago

Counting record based on a criteria

Hello! I have two tables: Classes and Students.

Classes fields: Class Name, Teacher, and Start Date
Students fields: Name, Class Name, and Start Date

Someone will enter records in the Classes table. Records of able are being populated from other apps. I want to count the number of students with the same class and start date in the Students table and put it in the Classes table. I tried summary fields in the relationship section but it doesn't seem to work.
  • My suggestion is to change the structure of your app.

    It should be set up like

    One Course Master has Many Scheduled Courses. 

    The Course Master is like the catalogue of the course content.

    The Scheduled Course is saying that say Economics 101 will be run  in the Fall 2018 semester. 

    Then One Scheduled Class will have many Student Class Registrations.

    One Student will have Many Student Class Registrations.
    • RuelYparraguirr's avatar
      RuelYparraguirr
      Qrew Trainee
      Thank you for your fast reply. I will try this one out. But will a simple summary field and lookup not work out?
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      The problem is that presumably you do not want to spend the rest of your life adding a new summary field every time there is a new scheduled class which has a unique start date.  That would be the only way to get a count of the # of students for a given start date.  But then every new Course Start date will need to have a new summary field, so that is not a correct design.