Jump to content
Server Maintenance This Week. ×

Script Question


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

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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