Skip 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.

Calculating vacation time for current year per user

Featured Replies

  • Newbies

I have a db containing three tables: User account, Time Cards, and Line items. The Time cards layout contains a portal to Line items in which users enter project hours and vacation time which is then summed to a calculation field (Time cards::Total PTO Vacation Hours) in Time cards for each user (Time cards::ID).

User account layout needs to calculate or sum the total vacation time (Time cards::Total PTO Vacation Hours) used for the current year (User account::PTO used this year_days) for each user (User account::ID).

The tables are related only by the ID fields. So everyone sees and edits there own data only. User account:Time cards is one to many and Time cards:Line items is many to many.

We started using this db in 2005 and all was well until 2006. The "User account::PTO used this year_days" field can not calculate based on data only for the current year. I need it to calculate how much vacation time a user has logged for the current year only.

I've attached a stripped down version of the db as a sample. With the current data entered in the sample, "User account::PTO used this year_days" should be only one (1) day, since only 8 hours of vacation time have been logged for 2006.

Any ideas on how I can go about fixing this? I've tried many things so far with no success.

2005-2006_Vacation_test.zip

Consider adding an additional qualifier into your if statement for you PTO Vacation hour calculation. Something like if Year(Week Ending) = Year(Get(CurrentDate))

Or you could have a global that stores the current year.

Either way that should limit the sum to only the current year.

HTH

  • 2 weeks later...
  • Author
  • Newbies

I've actually tried both of those already and, to my surprise, neither worked. This is another reason I am so puzzled by this problem.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.