Newbies spotbug Posted March 5, 2003 Newbies Posted March 5, 2003 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.
Ugo DI LUCA Posted March 5, 2003 Posted March 5, 2003 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. 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 !! I must say that I tried a couple of times before succeeding to make it work for one of my files. But when running , these running portals can make a big difference.
Recommended Posts
This topic is 8294 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now