One record per person per day

  • 0
  • 1
  • Question
  • Updated 11 months ago
  • Answered
(First, I'm new to QB.  So, sorry in advance.)  I have been asked to create functionality where employees can check-in/check-out at the beginning/end of day.  I found some apps in the exchange that were a little more complicated than I was hoping.  I'd like a one-table solution.  I'm thinking of a table with a single Text-Multiple Choice field that indicates "Check IN" or "Check OUT" and uses the record owner and the creation date/time for the only other data I need.  Maybe just make two links that pre-fills the in or out values and saves the record.  Simple!

The only thing I think would be nice is to be able to abort the save if that user had created that type of record (in or out) on that day with a message that a check-in or a check-out has already been created that day. Is this possible?  What is the best way to do this?

The first thing that comes to my mind is to create a kind of formula field that queries the database looking for the current user as the record owner and the current date as the creation date and returns a "1" if that combination is found which becomes the trigger to abort the save.  Is there a way to do this?  Is there a complete different method that makes sense?  Thanks!
Photo of Tate Forgey

Tate Forgey

  • 702 Points 500 badge 2x thumb

Posted 12 months ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,678 Points 20k badge 2x thumb
I think at a minimum you will need to have 2 tables.
1- Resources (all your employees)
2- Resource Logs

What you will want it to have the "In/Out" status be an option on the employee record.  Then you can utilize an action to add a 'log' every time they check in, and then edit that log to close out when they check out.

Even though it sounds simple.  To get the action to edit the correct record, or use any type of API button requires some guidance.  So don't feel bad if you get stuck.



Matthew Neil - Product Specialist