Noob here..... I'm trying to build a time keeping widget within my custom FM app. I work for a printing company and we are trying to move to a digital workflow for our tracking and accessing our printing projects and their details as they move through the different stages of production. I've begun building (sort of) an application to view all of a job's details and specifications, as well as information for the customer who ordered, contact, and shipping information, etc; basically everything you might need to know about a specific project. My employer has also tasked me with creating a way for each employee to log their time against each job they touch and I've run into several hurdles that I've been unable up to this point to climb over. One of the biggest problems I'm having is that at any given time, there can be multiple people in different areas of the shop that may be working on a job and when that happens they'll get the FM message that "X-Username is currently modifying this record", and so they cannot start logging their time. I'm not sure how to get around this. My thought was that I would have to make the timekeeping aspect of our application it's own separate file/app but we have some employees accessing the system via FM Go on an IPad so I don't know how well that would work. I'm a novice here so it very well may be that there is a simple solution but I've just not been able to come up with an answer yet. It doesn't help matters that what I've started from is a clunky FM app that was already in place that may not have necessarily been built using the best practices. Does anyone out there have any suggestions? I've attached some screenshots of what I'm working with.
Screenshot 1: The tables currently in our database
Screenshot 2: The current relationships within our database
Screenshot 3: The application as it looks now. In the bottom right corner, you will see my little timekeeping widget. Once a person has finished working on a job, they click the submit button which triggers a script to take the time and task and user information and enter it into the Time Management table (screenshot 4) which is accessed by our billing person.
Screenshot 4: Time Keeping table/layout accessed by our billing department. This is where the data goes that is recorded with the widget.
Screenshot 5: The script that runs when time is submitted by an employee. Each tab in the layout runs a slightly modified script in order to return the user to the same tab they were on in layout.
Another hurdle is when our pressmen work a night shift and begin working on a job before midnight and finish it after midnight (the next day) This returns a negative result because of my calculation for elapsed time:
( Endtime - StartTime) = Total time
Like I said, I am a noob and anything that I've accomplished successfully with this thing thus far has been a long arduous journey riddled with lots of cursing, a bit of crying, and many, many headaches. Any help will be GREATLY appreciated. Thanks in advance!