Jump to content

Running tally of day from a start date and stop when there is a departure date


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

Recommended Posts

  • Newbies

I am using Filemaker Pro Advanced to keep track of residence in our recovery program.  We like to keep a running total of how many days they are here in our program and have it stop when they depart our program  right now the calculation looks like this :

If(IsEmpty(Start Date) = 0; Get(CurrentDate)) - Start Date + 1 

 

This was done by a previous employee but it doesn't stop the calculation when the leave.  What I would like to do his to have it stop once the departure date field has a date in it but I am too new at all this to figure it out.  Any one have a calculation out there for this type of script?

 

Thanks, 

Sandi

 

Link to comment
Share on other sites

Something like:

Case(
  IsEmpty(Start Date) ; "" ;
  not isEmpty( Departure date ) ; Departure date - Start Date ;
  Get(CurrentDate) - Start Date + 1 )

Welcome to the forums!

  • Like 1
Link to comment
Share on other sites

I believe it could be simply:

If ( DepartureDate ; DepartureDate ; Get ( CurrentDate ) ) - StartDate + 1

Set the result type to Number and make sure that the calculation is unstored and that the option "Do not evaluate if all referenced fields are empty" is selected.

Link to comment
Share on other sites

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