appendEmployeePunchByIDNum() Method

Table of Contents

  1. Function
  2. Syntax
  3. Parameters
  4. Return Value
  5. Sample Code
  6. Remarks
  7. Possible Errors
  8. Alternate Method
  9. Related Methods

Function

Adds a punch transaction to employee’s time card for current or previous pay period

Syntax

AeXMLBridge.appendEmployeePunchByIDNum(IDNum, TimeStamp, StationNum, TransactionType);

Parameters

  • String - employee ID
  • String - timestamp (yyyy-mm-dd HH:mm:ss format)
  • Integer - station identifier
  • Integer - transaction type

Return Value

  • None

Sample Code C

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
string ts = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")                       
// get timestamp and format it appropriately

TAeBasicDataItem[] stations = ws.getStationsSimple();
// list of station ids

string empID = "1234";
// employee IDNum

int transType = 0;
// 0 = punch

try
{
ws.appendEmployeePunchByIDNum(empID, ts, station[0].Num, transtype);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

Sample Code VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Dim ts As String = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
' get timestamp and format appropriately

Dim stations As TAeBasicDataItem() = ws.getStationsSimple()
' can set to '0' for any

Dim empID As String = 1234
' employee id

Dim transType As Integer = 0
' 0 = punch

Try
ws.appendEmployeePunchByIDNum(empID, ts, stations(0).Num, transType)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • Punch transactions will always be applied unless a duplicate transaction exists
  • Please be aware of your current system date and how it may affect your new transaction
  • Use getStationsSimple to retrieve a list of clock group stations if needed
  • If station parameter is unknown or not available, set to 0

Possible Errors

  • Duplicate transaction
  • yyyy-mm-dd is required [Date supplied in invalid format]
  • Unable to locate employee with identifier
  • Transaction timestamp outside of acceptable range

Alternate Method

appendEmployeePunchByFilekey

appendEmployeeGeoPunchByIDNum
appendEmployeeTransferByIDNum
extractEmployeeGPSRegistrationsByIDNum
extractTimeClockStations
getStationsSimple
punchEmployeeGeoNowByIDNum
punchEmployeeNowByIDNum
registerEmployeeGPSPresenceByIDNum
transferEmployeeNowByIDNum

Back to Top