Counters: Calculation of totals
TCNTVAL() function
The TCNTVAL function returns the value of a
- a specified counter
- for a specified person
- over period of time (date range)
Using TCNTVAL() in an expression
To view the total of a counter in an expression, use
TCNTVAL(<your arguments>)
- The calculation is dynamic and can take some time, especially if used repeated, as in a report.
Examples
Get the value of counter REG1 for employee 222 for the entire year 2020:
TCNTVAL("TOT", "REG1", 222,{^2020/01/01}, {^2020/12/31})
With variables lnPERSID, ldFROM, ldTHRU available:
TCNTVAL("TOT", "REG1", lnPERSID, ldFROM, ldTHRU)
TCNTVAL arguments
- Operation to be performed
- "TOT" for total hours
- "TOT$" for total amounts
- Counter name. Defining a counter.
- Employee PERSID
- Start date of period counted
- End date of period counted
Internal calls
In some processes, the counters are evaluated automatically. The same TCNTVAL( ) function is used, but internally.
Example
- In benefits
It is used to calculate net pay or export data to external net pay. - In time banks
It is used to calculate vacation owed, especially for casual employees. If vacation rights are calculated during payroll, it is probably with a counter. You specify the counter in the attendance plan. - In the export to General Ledger
You could want to account for the cost of hours worked and absences according to various categories. Using the counters - For the record of employment
The ROE, ROEA and ROEB counters are used.
Viewing the results on screen
This window allows you to evaluate a counter for a given person and period. To open this window...
- First open the counter definition window by the
Data | Attendance, gross pay | Counters... main menu
Administration | Counters shortcut bar - Select your counter and click .
Select the person, the counter and the period; then click to display the results on screen.
© Carver Technologies, 2024 • Updated: 05/28/21