Following is a example of employee management system with check in and check out feature and checking log feature
*Click here to download the project file of this sample.(you can import the project file in Project Manager of ID Card Workshop)Database Structure:
Field Name | Data Type |
ID | Number |
First_Name | Text |
Last_Name | Text |
Department | Text |
Title | Text |
Location | Text |
Building | Text |
Phone | Text |
Email | Text |
Date_Of_Hire | DateTime |
Photo | Image |
Is_Card_Active | Yes/No |
checking_log | Text |
checked_in | Yes/No |
Here is the Check In Script(Manually Triggered Script):
var Time_now = new Date();
checked_in=true;
checking_log=checking_log+"Check In:"+Time_now+"\r\n" ;
Here is the Check Out Script(Manually Triggered Script):
var Time_now = new Date();
checked_in=false;
checking_log=checking_log+"Check Out:"+Time_now+"\r\n" ;
By adding the above manually triggered scripts into "Records Preview" event, the scripts and a 'run' button will be appeared on the window of "Records Preview" window, the window will be appeared once a record found by records seeker. Select the script and click "run" button, the script will change the status of checked_in, and adding the check in/out info into the checking log.
In order to ensure the size of the checking_long will not grow uncontrollably, you may also need adding the following automatically triggered log clearing script into "Records Preview" event, it will clear the checking log automatically after the length of checking_log is larger than 6000 letters.
if(checking_log!=null && checking_log.length>6000)
{
checking_log="";
}