6 Replies Latest reply on Mar 6, 2015 10:42 AM by sujastanly

    Calculate Time in and Time out

    sujastanly

      Title

      Calculate Time in and Time out

      Post

      Dear Forum members,

       

      I am new to filemaker. Have a table to monitor staff timein and timeout details. When a staff scan their ID card, the time they scan is captured  using get(currenttime). If the staff goes out, again the card is swiped, and this time  I need the time to be accepted in  timeout field, but the process creates a new record. 

      Any help is appreciated..

      Thanks in advance

       

       

        • 1. Re: Calculate Time in and Time out
          philmodjunk

          I suggest that you use get ( Timestamp )  if it is ever possible for someone to enter before midnight and leave after midnight.

          But you'll need to tell us how you have set up your system before we can suggest ways to modify it in order to get what you want.

          I'd guess that you have a scanner working in Keyboard emulation mode, but that's just a guess. And if so, it's a matter of how you set up the scanner and your database that will control what happens each time a card is scanned.

          • 2. Re: Calculate Time in and Time out
            sujastanly

            Thanks for the response. The system is not fully automated. I have a layout set up to scan the ID card manually into the Staff ID field and it gets updated in Staff attendance table. In Staff attendance table has Date(Get(CurrentDate))- Auto entered Calculated field, StaffID, Time in and timeout. Each Time the ID is scanned the table gets updated and I could see the details using a portal in my Master staff details table. I attach the screen shots.

             

            Thanks.

            • 3. Re: Calculate Time in and Time out
              philmodjunk

              If it is not fully automated, why/how is it creating new records?

              I am assuming that you are tracking the entrance and exit of employees. I realize they might be tenants or "guests", but the process is the same:

              A simple method is to scan the ID from the card into a global field. Then perform a script that uses the data in the global field to perform a find or match to related records. Your system can check a table of records linked to your employee table that track each persons entry and exit from the building. There can be two time (or timestamp) fields in each record in this table. your system can pull up the employee's set of records and check for one with a value in the "in" field, but no value in the "out" field. If one is found, the system can log them out by putting the time into the "out" field. If no such record is found, the system can create a new record and put the time into the "in" field to log them in.

              This can be automated, especially if you can set up the scanner to put text before and after the scanned data in order to trip script triggers to automate the process.

              See this thread, it's for bar code scanners, but the process is the same: Need help writing script to integrate barcode scanning

              PS. I've used the methods from this thread to automate scanning data off the magnetic strip on California Driver's Licenses.

              • 4. Re: Calculate Time in and Time out
                TKnTexas

                In generic terms, the swiping needs to activate a script that takes the EmpID captured to do a find for an open record, i.e. one that has a TIME-IN punch.  If it finds that, then this is a CLOCK OUT scenario so the time is set in the OUT field.  If it does not find the record, then it adds one, and records the CLOCK IN.

                End of day needs to review for missing punches, when someone who goes home without clocking out.  The next morning someone will approach to CLOCK IN, but the script will find the incomplete record and use it.  

                • 5. Re: Calculate Time in and Time out
                  sujastanly

                  Thanks Phil for  your response. I scripted to accept the time in and time out. It works as I need. But one more thing I want to do: I want to capture multiple time in and time out in the same day for each staff. How to go about that? Thanks in advance.

                   

                   

                  • 6. Re: Calculate Time in and Time out
                    sujastanly

                    Thank you all for the help. I figure it out and it is working. Thanks again