Discussions

Expand all | Collapse all

Counting record based on a criteria

  • 1.  Counting record based on a criteria

    Posted 05-15-2019 18:31
    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.


  • 2.  RE: Counting record based on a criteria

    Posted 05-15-2019 18:44
    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.


  • 3.  RE: Counting record based on a criteria

    Posted 05-15-2019 18:55
    Thank you for your fast reply. I will try this one out. But will a simple summary field and lookup not work out?


  • 4.  RE: Counting record based on a criteria

    Posted 05-15-2019 18:59
    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.


  • 5.  RE: Counting record based on a criteria

    Posted 05-15-2019 19:04
    Got it. Thank you so much.


  • 6.  RE: Counting record based on a criteria

    Posted 05-16-2019 13:13
    Hello. Just a follow up question. In the set up above, how many tables were on it?


  • 7.  RE: Counting record based on a criteria

    Posted 05-17-2019 01:50
    There are 4 tables.

    1. Course Master
    2. Scheduled Courses
    3. Students
    4. Student Class Registrations