Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

  • 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

 

Something like:

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

Welcome to the forums!

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.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.