Time Clock Button

  • 0
  • 2
  • Question
  • Updated 1 year ago
  • Answered
We are looking to add some additional functionality to our existing app. Employees are manually entering in the time they have spent on a project using a Time Card table, but would like to automate the process for accuracy.

Would it be possible for the employee to press a button that would start a timer, then press a button to stop the timer when they are interrupted or have to switch to another task? The total time spent would then display in a formula field. 

Does Quickbase have the ability or an available add-on product that would accomplish this? 
Photo of Hillary

Hillary

  • 214 Points 100 badge 2x thumb

Posted 2 years ago

  • 0
  • 2
Photo of Hillary

Hillary

  • 214 Points 100 badge 2x thumb
I did a little bit more digging and think I can accomplish this with URL buttons?
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
Depending on what you need to do will depend on how you can solve for it.

URL buttons will work to edit or create a record, but it doesn't keep the exact time, because it only used the time when the page was loaded.  So for example, if they click clock in, then stay on that job record, or keep it pulled up on their phone, then 2 hours later hit clock out, without reloading the page before, it will time stamp to the time the page was loaded (possibly 2 hours ago).

For the most accurate option you will want to use some JavaScript that will pull the time of button push, and not the time from the browser. 

Here are some screen shots of things I've done to track time in 3 different ways.

This is just a week data entry point, were you can punch in your time.  If you had multiple project you were splitting your time between you can have multiple lines, and it would total each day.

This one uses Java to create a time entry record, then they can click clock out.  This one was built so there would only be one time entry allowed at a time on a given job.  (was designed for a small service company)


This last one is a time clock for employees to clock in, but requires them to enter a pin # as to prevent others from clocking in for them, (as this pin also gives them access to view all time and payment, nobody wants to share that).



You can see there are different options, but most things will require some extra coding to really make the user experience better. 

I'm sure others have their own examples.
Photo of Hillary

Hillary

  • 214 Points 100 badge 2x thumb
If we were to use JavaScript to do this, could we also include an override option? This would be in case someone forgot to clock out of a task and accidentally left the clock running.
Hillary,
We've done this with time entry - but it could be easily adapted to another use case.  You will need javascript to get a button that makes sense to the users.  A couple of things you may need to consider
  • The timer will generally  keep time in HH:MM, but it's easier to edit the time if it's in decimal format.
  • If the person can have multiple timers - you will probably want to shut one off if another is turned on.
  • You may want to store the time in the browsers local memory - so it isn't lost if the user is disconnected from the internet.
  • You want an indicator to show the timer is running (a minute is a long time).  In the examples below we use a simple gif...
Anyway here is an example of a timer (you only need one button as a toggle).
With the timer running in HH:MM format:

Available for data entry (switches to decimal format when the user focuses the cursor in the hours field)


The UI is usually the hardest part.

Hope this helps..
Neil
Photo of Hillary

Hillary

  • 214 Points 100 badge 2x thumb
Thank you for you response! We's definitely want it in decimal format. Could it be programmed to round up or down to the near quarter hour? Would QB know if another timer starts in order to shut the previous timer down? Also, could an override be built in? This would be in case someone forgot to clock out of a task and accidentally left the clock running.
We actually support all of those things.  We round the time cards to the nearest 6 minutes - so you could do the same for 15 minute intervals - when the data is saved.  For one timer to be aware of another they would have to share the same page (so maybe you'd want a pop-up).  The override is supported (for the reason you mention - also if someone forgets to start a timer they can enter an initial time).
Our implementation is part of a time entry app, but this piece can be separated for other uses.
Neil
Photo of Hillary

Hillary

  • 214 Points 100 badge 2x thumb
This can all be accomplished through native QB and doesn't require any add-on products?
We implemented this as a javascript page running from qb.  So you would need to do that (or have us to it). But there are no products involved.  
Photo of Hillary

Hillary

  • 214 Points 100 badge 2x thumb
Neil,
If we were to implement this, could you provide me with your information? We would definitely need to hire this part out.