March 6, 200322 yr This has just gotta be a no-brainer, but maybe that's my problem . 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
March 6, 200322 yr 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
March 6, 200322 yr Why do you use " " for numbers ? I noticed sometimes the error message doesn't go to the first error when there are more than one.
March 6, 200322 yr Author 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
March 6, 200322 yr 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.
March 6, 200322 yr Author 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
March 6, 200322 yr 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
March 6, 200322 yr Author 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
Create an account or sign in to comment