Time & Attendance | Import Actual Timebands command
Summary |
Use this command to import timebands from a third-party software package or from a file that meets the format criteria. |
CSV (txt) format fields |
Each imported timeband must have at least 26 fields, and the first 4 fields must contain values. Note that the 27th field, Text, is optional BuildThisField(pTBFile, lsFieldList, 'EmployeeCode'); BuildThisField(pTBFile, lsFieldList, 'Date'); BuildThisField(pTBFile, lsFieldList, 'StartTime'); BuildThisField(pTBFile, lsFieldList, 'EndTime'); BuildThisField(pTBFile, lsFieldList, 'ReasonCode'); BuildThisField(pTBFile, lsFieldList, 'BreakAmount'); BuildThisField(pTBFile, lsFieldList, 'BreakCode'); BuildThisField(pTBFile, lsFieldList, 'RequirementCode'); BuildThisField(pTBFile, lsFieldList, 'WorkAreaCode'); BuildThisField(pTBFile, lsFieldList, 'LocationCode'); BuildThisField(pTBFile, lsFieldList, 'DepartmentCode'); BuildThisField(pTBFile, lsFieldList, 'Dim1Code'); BuildThisField(pTBFile, lsFieldList, 'Dim2Code'); BuildThisField(pTBFile, lsFieldList, 'Dim3Code'); BuildThisField(pTBFile, lsFieldList, 'Dim4Code'); BuildThisField(pTBFile, lsFieldList, 'PositionCode'); BuildThisField(pTBFile, lsFieldList, 'TaskCode'); BuildThisField(pTBFile, lsFieldList, 'ShiftCode'); BuildThisField(pTBFile, lsFieldList, 'ShiftGroupCode'); BuildThisField(pTBFile, lsFieldList, 'Type1Code'); BuildThisField(pTBFile, lsFieldList, 'Type2Code'); BuildThisField(pTBFile, lsFieldList, 'Type3Code'); BuildThisField(pTBFile, lsFieldList, 'Type4Code'); BuildThisField(pTBFile, lsFieldList, 'AwardCode'); BuildThisField(pTBFile, lsFieldList, 'RateCode'); BuildThisField(pTBFile, lsFieldList, 'RateAmount'); BuildThisField(pTBFile, lsFieldList, 'Text'); |
Datatypes |
The following table shows the datatypes of these 26 fields:
|
File format |
Example 1 - Mandatory and other fields, without Text field One timeband in the CSV import file has the following format: 1005,20090615,555,975,,0,,,,,,,,,,,,,,,,,,,0,20.09
Because the last field has data in it (20.09), there is no need for a trailing comma
Another timeband in the CSV import file has the following format: 1006,20090615,550,980,,,,,,,,,,,,,,,,,,,,,,,
If you import only the first 4 mandatory fields, then you still have to include comma placeholders for the 22 empty fields, to have a total of 26 commas. Because the last field has no data in it, there is a need for an extra trailing comma.
Example 3 - Mandatory fields only, plus Text field Another timeband in the CSV import file has the following format: 1006,20090615,550,980,,,,,,,,,,,,,,,,,,,,,,,This is text
If you import only the first 4 mandatory fields and the text field, then you have to include comma placeholders for the 22 empty fields prior to the text field (which is in position 27), to have a total of 26 commas. No trailing comma is required. |