May 8, 200619 yr Solution / : A timer idea I'm kicking around for use in my project Description: A quick explanation: I need a timer that allows the timekeeper to start and stop the clock, and have the sum of the time added up automatically. My first impression was to use a couple of fields and some scripts to keep track of the times, add new times, etc. But it occurred to me that I could use relationships, and I thought I'd try it that way and see if it would work. The attached file is an extremely rudimentary proof of concept. The buttons could easily be replaced with a single button, and there is absolutely no error checking yet, as I'm more concerned with trying to figure out if this system is viable, or if there are problems with it. Error checking in the scripts and calculations, and use of a single activation button should eliminate some of the weaknesses of the current layout, but I'm interested in opinions of possible limitations as I'm sure this is something other people have tried and maybe used it, and I'm hoping to tap that experience now before I invest a lot of time in trying to "fool proof" this concept and integrate it into my project. For an idea of what my project is, it is a legal case management solution with time billing capabilities. Working Under: 8 Advanced Solution Status: Beta Pre-requisites: Author(s): coconutt2000 Date: 05/08/06 Credits: Instructions / Other Info: Disclaimer: FM Forums does not endorse or warrantee these files are fit for any particular purpose. Do not post or distribute files without written approval from the copyright owner. All files are deemed public domain unless otherwise indictated. Please backup every file that you intend to modify. timerdemo.fp7.zip
May 8, 200619 yr Hi Coconut I had a quick look at your dem and there seems to be a line 'unknown' in the start button script. The script seems to work anyway,just thought I'd mention it in case it mattered Phil
May 8, 200619 yr Author Sorry, yeah - there's a variable declaration in there. I should've used a global field. If you add a global field, and alter the script to grab the id of the new "start time" line item and stick it in the global field, and when you create a new "end time" line item, stick that value into the "time pair id" field, the demo should work properly.
May 8, 200619 yr I believe you are spending a lot of resources to solve a problem that shouldn't exist in the first place: StartTime and EndTime are both attributes of an Activity - these three should be kept together in a single record.
May 8, 200619 yr Author LOL, good point. Somewhere there's a reason for choosing the way I did it, and if I can remember it - I'll post it, but that the moment, I'm at a loss. Perhaps I get caught up in "relationships" too much... : )
May 12, 200619 yr That was my first thought exactly... I built one, and am actually looking for a solution to show a "RUNNING TIME".. mine is basically like yours except I have start and end time as one record. This makes it far less confusing as to when a call was started and ended.
May 14, 200619 yr If you wanted to get more precise you might want to use seconds instead and just use Minutes(Sum(timelineitems::seconds))
Create an account or sign in to comment