Tomo1 Posted February 1, 2002 Posted February 1, 2002 I have a database that tracks work during the day. When a job is started, the time is inputted into the time field, each job is allocated x amount of time. My problem is, that becuase the Database is in real time, if I start a job at 4 o clock and leave at 5, the time through the night would be recorded. It's unreliable to make people click a pause or stop button??
Fitch Posted February 2, 2002 Posted February 2, 2002 If you're wanting to stop the clock after a set period of inactivity, you'll have to look outside of FileMaker. I used to use a neat little Mac app called Logout, which I managed to dig up (took some digging)http://wuarchive.wustl.edu/systems/mac/info-mac/app/time/log-out-221.hqx What a cool little program! From 1996! It may still work. It creates a text file that you could easily import into FileMaker. If you want to keep your solution entirely within FileMaker, there may be a plug-in for this... perhaps Waves in Motion The only way I can really see to do a "pure" FileMaker solution is to make your time-elapsed calculation something like: Case(IsEmpty(EndTime), Max(AllocatedTime, 17 - StartTime), EndTime - StartTime) This assumes you're defaulting to a 5 p.m. logout (5 p.m. = 17). Also whether you want to use Max vs. Min you'll have to ponder which is more suitable for your situation. A different approach altogether would be to set a logged-in "flag" when the user logs in their start time. Then, add to the login script the appropriate steps to prevent logging in until the last job is logged out. I'd probably Set Field [LoginFlag] to the current JobID when they log in. So next time they log in (when they haven't logged out of the last job), you could take the user to the Related job and tell them to put in an End Time and Log Out. Be sure to clear the LoginFlag when they log out. You are using buttons for this, right?
Recommended Posts
This topic is 8329 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