jbullydawg Posted August 16, 2005 Posted August 16, 2005 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.
RalphL Posted August 16, 2005 Posted August 16, 2005 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.
jbullydawg Posted August 16, 2005 Author Posted August 16, 2005 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!!
jbullydawg Posted August 16, 2005 Author Posted August 16, 2005 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?
-Queue- Posted August 16, 2005 Posted August 16, 2005 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.
comment Posted August 16, 2005 Posted August 16, 2005 I have just now answered this same question here. Please do not double post.
Recommended Posts
This topic is 7097 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 accountSign in
Already have an account? Sign in here.
Sign In Now