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.

Calc Field to Find Day 100 in a Range

Featured Replies

I would like to create a calculated field that can give me the date for day 10 searching through the related records.

Example:

Jon Doe has worked for 20 days. There are several records that have a start date and a stope date. Let's say that record one has a start date of 1/1/02 and a stop date of 1/5/02. This gives me 5 days worked. The next record has a start date of 3/1/02 and a stop date of 3/15/02 giving me 15 days worked for a grand total of 20 days worked. The calculated field would need to return a date of 3/5/02; day number 10 of the 20 days worked.

Any help would be appreciated.

A concept answer - no script just yet (and this just addresses all days - not Mon-Fri working days only) ...

create a field for days worked this period

create a field for cumulative days worked

create a global field to store the number you want to search for ( I'll use 10 in this example)

Find all the records for john doe and sort them by start date - oldest first.

Run a looping script through these records which:

calculates the cumulative days worked at the end of each period (record).

checks to see if the cumulative days worked is >= 10. If not - on to next record in the loop.

If it is, then the date you are after is:

start date for this record + days worked this period - (cumulative days this record - 10 + 1)

There may be a more compact way to do this using a running count summary field for cumulative days worked.

Russ Baker

Canberra, Australia

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.