August 16, 200520 yr I'm painfully new to scripting in FileMaker and need help. I'm trying to help with a payroll project for instructors of our independent study courses. Here are the lay man's version of the two if/then statements I have: [[if the student has dropped the course AFTER 60 days from the enrollment date then the instructor recieves $50.]] [[if the student has dropped the course BEFORE 60 days from the enrollment date then the instructor recieves $25.]] I don't even know really where to begin. Any insight is greatly appreciated. Thank you.
August 16, 200520 yr This looks more like a calculaation than a script. You will need the ClassStartDate and DroppedDate. Then a case statement or an if statement can be used. The case statement would look like this: Case ( not IsEmpty ( DroppedDate; Case ( DroppedDate - ClassStartDate >= 60 ; 50 ; 25)) The first case checks that there is a DroppedDate, the second calculates the amout if there is. If there is no DroppedDate the result is a null.
August 16, 200520 yr Author I must have had scripts on the brain when i typed that in. yes, of course, it's a calculation. One question about what you have used an example though....should I not be closing the first case off with a parentheses? Also, I've tried that but are getting other errors such as "An Operator is expected here" and it shows up between Case and the parentheses in the second statement...so I'm lost. But your example is great help.....a good starting place for me. Thank you!!
August 16, 200520 yr Author Here's what i have come up with: If (Date Dropped - Date Enrolled >= 60, 50, 25) and it works!! Holy Crap! So how do I get it to only show those students with drop dates?
August 16, 200520 yr Ralph's calc is missing a close parens after the first DroppedDate. If( not IsEmpty(DateDropped); If( DateDropped - DateEnrolled >= 60; 50; 25 )) If DateDropped is empty, no result is produced.
Create an account or sign in to comment