Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5606 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a student table related to a teacher table. If a student is a male, he gets a 0. If a student is a girl, she gets a 1.

In my teacher table, I wanted to create three basic calculations to determine the # of boys and girls in each teacher's class, however, what I thought would be straightforward calculations just aren't resulting in ANY data whatsoever.

There are three fields I have calcs for in my teacher table:

Total male students

Total female students

Total Students

My thought process was:

Total_Female_Students = Sum (Students::Gender)

Total_Students = Count (Students::Teacher_IDfk)

Total Male Students = Total_Students - Total_Female_Students

At first, I thought the correct syntax for the Count calculation was Count (Students::Teacher_ID)

However, this syntax resulted in the error "the specified field cannot be found", because I don't have a field of Teacher_ID in the student table, just a Teacher_IDfk field.

Any suggestions? I'm sure it's right in front of me, and it's driving me crazy! All I'm staring are blank fields right now--clearly the calculations aren't working, but I'm not sure why...either incorrect syntax, or some sort of relationship problem?

Thanks in advance!

Posted (edited)

You should have posted this in the original thread:

http://fmforums.com/forum/showtopic.php?tid/211095/

Students::TeacherID is the name I used in the example for the matchfield in the Students table (the foreign key to the Teachers table). In your implementation, you need to use your own field/table names.

Note that these calculation fields need to be in the Teachers table.

Edited by Guest
Posted

Sorry about the misplacement of the post.

In the teacher field there's Teacher_ID

In the student field there's Teacher_IDfk

Count ( Students::Teacher_IDfk )

I thought my syntax was correct, but I'm not getting anything. I really have no idea how to brainstorm possible reasons this is getting tripped up. Any help would be very, very appreciated. Thanks for your patience!

Posted

I'm confused. When I try the sum option, it only lets me sum fields within the teacher table, which doesn't help, as I want to sum records in the student table. These two tables are related, yet I can't sum student records in the teacher table.

Am I doing something wrong?

This topic is 5606 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.