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 Total of Related Records? Help!

Featured Replies

  • Newbies

I'm pretty much an FM newbie. I've only been working with it for a few months now, but I've been having pretty good success, until now...

For clarity, I'll try to strip this down to only the essential info:

I'm working on a sort of time clock system (that's already a big simplification, but it's a very good one).

I have one file, "File A", which holds all the employees. I have another file, "File B", which holds the time worked by the employees as durations (each record in the file is a duration worked). Each duration in "File B" is associated with one of the employees in "File A" and has a start and stop date and time (thus defining the duration).

We have a need for a field which would calculate, for each duration, the accumulated time for the week, up to that duration (the sum of all the durations before this one that are in the same week). So, a duration on a Wednesday needs to know the sum of all the durations (for the same employee) on Monday, Tuesday and earlier on Wednesday of the same week.

I broke-out the durations in a given week by creating a self-join relationship which gives all the durations for a particular employee during the same week. Then I can use Sum(selfRelation::durationLength) to get the total for that employee for the entire week. However, what I need is the sum up to the current duration; a running total.

Is there a way to do this?

Please let me know if anything needs to be clarified.

The best you can do is have a look for Portal Runner at http://www.fmfiles.com/tnt5.html.

It is an unlock example of a Running Portal with 2 sortkeys.

You'll probably spend some time as there is no tutorial attached to this file. frown.gif

It is essentially based on a bunch of calcs from serial numbers attached in the Child file and some "reverse" relationships to the Master. Ughhhh !! crazy.gif

I must say that I tried a couple of times before succeeding to make it work for one of my files. But when running wink.gif , these running portals can make a big difference.

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.