Lougee Posted March 6, 2003 Posted March 6, 2003 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
Lee Smith Posted March 6, 2003 Posted March 6, 2003 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
Ugo DI LUCA Posted March 6, 2003 Posted March 6, 2003 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.
Lougee Posted March 6, 2003 Author Posted March 6, 2003 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
Lougee Posted March 6, 2003 Author Posted March 6, 2003 I get exactly the same error message without the ""... Abbe
slstrother Posted March 6, 2003 Posted March 6, 2003 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.
Lougee Posted March 6, 2003 Author Posted March 6, 2003 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
Lee Smith Posted March 6, 2003 Posted March 6, 2003 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
Lougee Posted March 6, 2003 Author Posted March 6, 2003 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now