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.

Auto Updating Field

Featured Replies

I have a personell management file that keep track of school faculty and staff. I have a field on the form called hire date. I have another field called years of service that show how many years the member has been with the school. I want that years of service field to relate to the hire date and automatically update the number of years of service so i dont have to do so manually. How do I go about doing so?

Thanks For The Help!!

Erik

Your Years Of Service field should be a calculation (result is date) as:

Let ( [

now = Get ( CurrentDate ) ;

this = Date ( Month ( HireDate ) ; Day ( HireDate ) ; Year ( now ) )

] ;

Year ( now ) - Year ( HireDate ) - ( now < this )

) // END LET

When you create this calculation (and you are still in the calculation dialog, go into Storage Options and select the checkbox 'do not store calculation results.' This is required so the calculation updates every time it is accessed.

Your Years Of Service field should be a calculation (result is date)

Your fingers slipped: result type should be Number.

Thank you but I think it was that my mind slipped. :blush2:

BTW, someone could also use Ray's trickery calc for the test whether full year has lapsed, which is if IIRC:

Month ( now ) + Day ( now ) / 100 < Month ( HireDate ) + Day ( HireDate ) [color:red]/ 100

Edited by Guest
forgot red

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.