Jump to content

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

Recommended Posts

Posted

This has just gotta be a no-brainer, but maybe that's my problem smirk.gif.

Anyway, I'm trying to get the maximum grade for each enrolled student and from there I have a calculation which will return the graduation year.

My uncooperative calculation is:

Case

(Max (grade) = "4", graduationYear4thGrade,

(Max (grade) = "5", graduationYear5thGrade,

(Max (grade) = "6", graduationYear6thGrade,

(Max (grade) = "7", graduationYear7thGrade,

(Max (grade) = "8", graduationYear8thGrade,

(Max (grade) = "9", graduationYear9thGrade,

(Max (grade) = "10", graduationYear10thGrade,

(Max (grade) = "11", graduationYear11thGrade,

graduationYear12thGrade))))))))

But I keep getting an error message -- "There are too many separators in this function." The 'function' selected is "5", which looks to me to be identical to "4", but apparently isn't.

Can anyone tell me what I'm doing wrong?

Abbe

Posted

H Abbe,

I'm on my way out the door for a bit, but you could Try putting the =4, etc inside the (grade) i.e. (grade=4) etc.

Let me know if it is still broken

Lee

Posted

Darn program is fussy about that too!! Tried it and FileMaker won't let me put the operator inside the () as in (max (grade = "4")...

Abbe

Posted

Try it this way:

Case(

Max (grade) = 4, "graduationYear4thGrade",

Max (grade) = 5, "graduationYear5thGrade",

Max (grade) = 6, "graduationYear6thGrade",

Max (grade) = 7, "graduationYear7thGrade",

Max (grade) = 8, "graduationYear8thGrade",

Max (grade) = 9, "graduationYear9thGrade",

Max (grade) = 10,"graduationYear10thGrade",

Max (grade) = 11,"graduationYear11thGrade",

"graduationYear12thGrade")

A case statement does not require a ( and ) for each condition.

Posted

Sistrother...

Thanks for the suggestions, but won't FileMaker take the phrases inside the "" as literals? They're not; they're other calculated fields.

Abbe

Posted

Hi Abbe

I'm back and I see you got a lot of help while I was gone. You are correct, you do not need the "" if they are fields.

Lee

Posted

NOW I see what you're trying to show me!

I put the extra ( and ) for the MAX function, not the CASE. But either way, I was wrong.

You fixed it!! Thanks.

Abbe

This topic is 8003 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.