I created scripts for technicians to clock in and clock out are working fine.
However, I want to add an option where managers can select several technicians in the check boxes to clock in.
If the user(s) already clock in (Clock In field isn't empty & Clock Out field is empty), then prompt the manager that user(s) are clocked in, no need to clock in again.
The check boxes are global field.
The time sheet is like this:
Date Technician Clock In Clock Out Total Hour
The checkboxes look like this:
Technician A x
Technician C x
I need some suggestion about this script:
Enter Find Mode [ ]
Exit Loop If [ Get ( FoundCount ) > ValueCount ( Menu::g_Technician ) ]
Set Field [ Time Clock::Technician ; GetValue ( Menu::g_Technician ; Get ( RecordNumber ) ) ]
Perform Find [ ]
Set Error Capture [On]
If isEmpty [Time Clock::Clock Out] & not isEmpty [Time Clock::Clock In]
Show Custom Dialog [ Title: "Alert, This Technician already clocked in."; Default Button: “OK”, Commit: “Yes” ]
Set Field [Time Clock::Technician; Menu::g_Technician ]
Set Field [Time Clock::Date; Get (Current Date) ]
Set Field [Time Clock::Clock In; Get (Current Time) ]