Locate (Contains) :
Functions

Note: Functions displayed in blue are linked to example pages.

Function
Description
Parameters: (Date, Clocking Time, Clocking Line Time, Direction)
Adds a clocking in the processing queue. Use at the "Before Daily Processing" embed point. Use 'I' or 'O' for the direction (including the single quotation marks).
Adds a new daily hours record at the specified embed point for the process date and process employees. Time categories and employee categories can be set before adding the record, otherwise the existing processed values will be saved. When used at the embed point "At After Saving Daily Hours", a payroll record will be added. When used at the embed point "At After Saving Job Hours", a job record will be added.
AddPayrollHours()
Adds a new payroll hours record at the specified embed point for the process date and process employees. Time categories and employee categories can be set before adding the record, otherwise the existing processed values will be saved. When used at the embed point "At After Saving Payroll Hours", a payroll record will be added. When used at the embed point "At After Saving Job Hours", a job record will be added.
ClearDailyHours()
Clears the values of the existing hours record ready to be written. Use at the embed point "At After Saving Daily Hours" or "At After Saving Job Hours".
ClearPayrollHours()
Clears the values of the existing hours record ready to be written. Use at the embed point "At After Saving Payroll Hours" or "At After Saving Job Hours".
Clock
Returns the current time on the PC.
ClockingLatitude[X]
ClockingLongitude[X]
Where x can be 1 to 20 and represents the clocking number of that day.
Parameters : (Site,Emp,FromDate,ToDate,FromTime,ToTime,Options,Area)
Counts the number of clockings for a single employee between a start point (Fromdate, Fromtime) and end point (Enddate, Endtime). The Options field is a 3 character string where the first character determines the direction: I for In, O for Out or B for Both.
The second character determines the clocking type: M for Manual, B for Bulk, C for Clocked, or space for all.
The third character determines the clocking scope: A for Access, P for Payroll or space for both.
The default - ' ' - (3 spaces between single quotation marks) will include all options.
If the Area parameter is set, then only clockings going IN to that area will be counted. The value to be used is the "Area Number". The default ' ' (3 spaces between quotation marks) will be for all areas.
Parameters : (Site,Emp,FromDate,ToDate,FromTime,ToTime,Options)
Counts the actual amount of raw time for a single employee between a start point (fromdate, fromtime) and end point (enddate, endtime). The options field is a 3 character string where the first character determines the time being included: I for time In, O for time Out.
The second character determines the clocking to include: M for Manual, B for Bulk, C for Clocked, or space for all.
The third character determines the clocking scope: A for Access, P for Payroll or space for both.
Parameters:(Site,Emp,FromDate,ToDate,FromTime,ToTime,Options,StartDevices,EndDevices)
Counts the time between a clocking at one of the start devices and the next clocking at one of the end devices. Direction and area does not matter. Options are not supported at the moment and should be ''.
The Devices are comma seperated and in between single quotes e.g. '1,4,7,9'.
Example: CountTimeAtDevice(ProcessSite,ProcessEmp,ProcessDate,ProcessDate,0,8640000,'','1,5,8','2,6,9')
CountTimeEx
Parameters : (Site,Emp,FromDate,ToDate,FromTime,ToTime,Options,Area)
Counts the actual amount of raw time for a single employee between a start point (fromdate, fromtime) and end point (enddate, endtime).
The options field is a 5 character string where the first character determines the time being included: I for time In, O for time Out.
The second character determines the clocking to include: M for Manual, B for Bulk, C for Clocked, or space for all.
The third character determines the clocking scope: A for Access, P for Payroll or space for both.
Note that counting both TNA and Access time couldlead to unexpected answers as the two are somewhat separate in concept. Explicitly using P or A is recommended.
The fourth character determines the clocking scope: R for Rounding to nearest minute, space for do not round.
The fifth character determines the clocking scope: B for Break every day – apply in and out times to each date.
If the Area parameter is set, then only Access clockings will be used. The value to be used is the "Area Number". The default ' ' (3 spaces between single quotation marks) will be for all areas.
Note: CountTime is an older function that takes only 7 parameters. It is the same as CountTimeEx with the last parameter set as -1.
Date()
Parameters: (month,day,year)
Returns standard clarion date.
First of the month: Date(Month(processdate),1,Year(processdate))
Days in month: Day(Date(Date(Month(processdate)+1,0,Year(processdate))))
DeletePayrollHours
Parameters : (Site, Emp, Date, Rate, Type)
Deletes a Payroll hours record. Use at "At After Saving Payroll Hours", before adding a new payroll hours record. Suggested variables to use include ProcessSite, ProcessEmp and ProcessDate.
EmpInAt
Parameters : (Site, Emp, Date, Time)
Returns 1 if the employee is clocked in at a specific date and time. Returns 0 if the employee is clocked out. Suggested variables to use include ProcessSite, ProcessEmp and ProcessDate.
Parameters: (Site,Emp,FromDate,Todate,Rate,FromCat,ToCat,Step)
Gets the average daily time worked by an employee between two dates. If Rate is set blank (ie 2 single quotes '') then all rates are included. The FromCat and ToCat parameters allow you to limit the time categories included. The Step parameter allows you to skip days. For example if Fromdate is set to a Monday, and you only want to average time worked on Mondays, then set Step to 7.
GetAveragePayrollHours
Parameters: (Site,Emp,FromDate,Todate,Rate,FromCat,ToCat)
Gets the average weekly time worked by an employee between two dates. If Rate is set blank (ie 2 single quotes '') then all rates are included. The FromCat and ToCat parameters allow you to limit the time categories included.
Parameters : (Site, Emp, FromDate, ToDate, Rate, Category)
Gets the number of Daily Hours earned by an employee between two dates. If Rate is set blank (ie 2 single quotes '') then all rates are included. If the Category is left blank then all time categories are included. The answer is returned in Standard Time Format. Suggest ProcessSite, ProcessEmp and ProcessDate as relevant variables. You should not include the current ProcessDate in the date range above. However you can use dates relative to the ProcessDate, for example yesterday is ProcessDate-1.
GetEmpHoursEx
Parameters: (Site, Emp, FromDate, ToDate, Rate, Category, Exclude,Rate)
Where Exclude = ProcessDate the function will only return the total of any manual hours records for the specified period. Exclude = -1 will only return the total for processed hours. Available from TNA 6.04k
GetEmpDailyHoursExpected
Parameters:(Site, EmpNo, FromDate, ToDate, IncludeLeave, EmpOverrideDailyShiftPattern)
Where IncludeLeave = 0, the leave hours are not included into the calculation. IncludeLeave = 1 does include the leave hours. Where EmpOverrideDailyShiftPattern = -1, the Daily shift overrides are not included.EmpOverrideDailyShiftPattern = 0 does include the Daily Shift overrides.
GetEmpHoursFieldValue
Parameters: (Site,EmpNo,Date,'string field')
Returns the string value found in the following daily hours fields:
'comment' = (DAI:Comment)
'clockings' = (DAI:Clockings)
'shift' = (DAI:Shift)
'timeslotcode' = (DAI:TimeSlotCode)
'stdhours' = (DAI:StdHours)
'user1' = (DAI:User1)
'user2' = (DAI:User2)
'user3' = (DAI:User3) If the field is blank it will return a string containing 'Field not found'.
GetEmpPayrollHours
The same as GetEmpDailyHours, but gets time from the Payroll Hours.
GetExpectedHours
Parameters : (Site, Employee, Date, StandardHours)
Returns the Expected Hours for that employee for that week. If a specific record for an employee exists then that is used, if not the the shift setting is used. If the shift setting is "Use Standard Hours" then the parameter StandardHours, as passed in, is passed back to you.
GetHolidayHours
Parameters: (LeaveType, Rate, Category, TimeSlotCode)
Returns the holiday hours for a specific leave type, rate, time category and timeslotcode. If the TimeSlotCode is blank (or 0) then it will use the TimeSlotCode currently used during processing. Suggested use is afer the "At After Selecting Shift" embed point. If no record exists for the specified LeaveType on this TimeSlotCode, it will return the value for "All Others" (i.e. 0). Available from TNA 6.04h.
GetRawClockings
Parameters: (Employee, From Date, To Date, From Time, To Time, Options)
Returns the raw clocking times for the specified period. All options must be seperated by a comma. If the options are blank, all clockings except deleted will be returned. Options are: I Suppress In
O - Suppress Out
M - Suppress Manual / Bulk
D - Returns clockings for this device number e.g. D-2 will return clockings for device 2
J - Suppress Job clockings
A - Suppress Access clockings
H - Suppress Info clockings
T - Suppress TNA clockings
F - Time format for clocking times. Default format is the clo:time stored format
TR - FromTime applied to FromDate and ToTime is applied to ToDate only. The default is for each day.
C - Comma seperator in the returned string (default)
P - Pipe () seperator
CC-x where  x 1 - Company, 2 - Branch, 3 - Department, 4 - Cost Center, 5 - Category, 6 - Scale, 7 - Emp Type, 8 - Work Group, 9 - Job. Returns -CC-clo:value after the clocking time
Example:
GetRawClockings(processemp,processdate-1,processdate-1,06:00,18:00,'J,A,H') will return TNA clockings with the clocking directions as a string for yesterday between 6am and 6pm.
GetDHFirstLastClockingInfo
Parameters: (Employee, Date, Options)
Returns the raw clocking times for the specified period. All options must be separated by a comma. If the options are blank, The dailyhours FirstClocking latitude and longitude will be returned comma seperated. Options are:
First - Return the daily hours firstcloking info
Last - Return the daily hours lastcloking info
FirstLast - Return the daily hours first and last cloking info
LAT - Return the latitude of the dailyhours first or last clocking
LONG - Return the longitude of the dailyhours first or last clocking
LATLONG - Return the latitude and longitude of the dailyhours first or last clocking
C - Comma seperator in the returned string (default)
P - Pipe () seperator
GetDHFirstLastClockingInfo(ProcessEmp,ProcessDate,'First,Lat,P') will return the dailyhours first clocking latitude for the currrent processdate in pipe delimted format.
InRoundBreak
Allows for override of In rounding break value
OutRoundBreak
Allows for override of Out rounding break value
InRoundLength
Allows for override of In rounding length value
InString
Parameters :(Substring, String, Step, Start)
Searches for a substring in a string. A negative step value (-1) will search from right to left within the string
OutRoundLength
Allows for override of Out rounding length value
IsOnLeave
Parameters :(Site, Employee, Date)
Returns the Leave Type if the Employee is on leave on the date. Returns 0 otherwise. Suggest ProcessSite and ProcessEmp for the employee currently being processed. Suggest ProcessDate for the date currently being processed.
IsPublicHoliday
Parameters :(Date, State)
Returns a 1 if the date is a Public Holiday. Returns 0 otherwise. Suggest ProcessDate and emp:state for the employee currently being processed.
IsSpecialHoliday
Parameters :(Date, State)
Returns a 1 if the date is a Special Public Holiday. Returns 0 otherwise. Suggest ProcessDate and emp:state for the employee currently being processed.
LineUsed
Parameters :(Date)
Returns the Line used for processing, for the same employee on a different day. If you need the line currently being used on this Process Day then use UseLine.
ProcessDay
Parameters : (From,To, Site, Employee)
Schedules a day, or range of days, for daily processing. Note that it only SCHEDULES the processing, it doesn't do the processing. Be careful with this that you don't cause an endless loop.
ProcessWeek
Parameters : (From,To, Site, Employee)
Schedules a week, or range of weeks, for payroll processing. Note that it only SCHEDULES the processing, it doesn't do the processing. Be careful with this that you don't cause an endless loop.
Sub
Parameters : (String,Position,Length)
Returns a portion of a string. if position is negative it points to the character position relative to the end of the string.
Today
Returns the current date on the PC. Use ProcessDate if you need the date currently being processed.
WeekEndDate
Parameters: (TimelineCode, Date)
Returns the payroll period end date for the specified date.
Parameters : (Code, Description, Time, Type)
Allows you to write an entry to the Errors file. You can write your own error by setting the code to a number between 100 and 255. The Type should be set to 'D' for a daily error, and 'W' for a payroll shift error. The Description, and Time are available for anything you want.
Parameters : (Code, Description, Time, Type)
Allows you to write an entry to the Warnings file. You can write your own warning by setting the code to a number between 100 and 255. The Type should be set to 'D' for a daily shift warning, and 'W' for a payroll shift warning. The Description, and Time are available for anything you want.
Updated by Robert de Jager on 1 JUL 2025
Locate (Contains) :