GTR Processing in Chris21
GTR processing in Chris21 enables electronic transfer of records from a format such as an Excel Spreadsheet to most forms in Chris21. In this way, many records can be transferred in a matter of minutes.
The Business Rules Engine (BRE) handles the data transfer into Chris21. The BRE will check each record as it is passed through and ensure that each record is valid. Invalid records will not be loaded and an error report will be produced, detailing each error.
This document explains the process required to electronically load data into Chris21 using the GTR utility.
Spreadsheet Preparation
The data to be loaded into Chris21 using the GTR process must firstly be set up in an Excel spreadsheet. An Excel macro will then be run over this spreadsheet to format the data so that it can be electronically loaded into Chris21. It is essential that the spreadsheet is set up in the following manner:
- The first row is the header record;
- The header record (first row) must include the data dictionary field names for each Chris 21 field that will be populated;
- There must be no empty rows between the header row and detail row;
- There must be no empty rows between the first detail row and the last.
The example below shows a spreadsheet that has been prepared to load Skill (SKL) records into Chris21. The next Section describes the steps involved to create this Spreadsheet.
Creating the Spreadsheet
The most important part of this process is creating the Spreadsheet header row. The easiest and most reliable way to achieve this is to run a Chris21 Report Designer report. You will be aware that Chris21 report output includes two header rows – the data dictionary field names on the first row and the field labels on the second row. You need to use the data dictionary field names in the spreadsheet you prepare for GTR.
Step 1: Create a report which includes all the fields required in your GTR. For instance, if you want to run a GTR to update every field in the Skills (SKL) form you will need to add each of these fields to your report.
Step 2: Publish the report to Excel.
Step 3: Delete all the data from the report you have just published, except for the header row with the data dictionary field names. You now have a valid header row for your GTR spreadsheet:
Step 4: Copy the data you want to load with your GTR into the appropriate columns. Your completed spreadsheet should be in the format shown below:
About the Data Dictionary
The Data Dictionary contains a list of all the Field Codes in Chris21. Each field code uniquely identifies a field on a Chris21 form. The GTR process uses field codes to determine which field to populate with data.
Note that the fields at the top of your spreadsheet will match the field names in the Data Dictionary.
Spreadsheet Conversion
The spreadsheet must be converted to a text file prior to loading the data into Chris21. The data must be converted into a specific format that the Business Rules Engine (BRE) can interpret. Use an Excel macro to convert the spreadsheet into the required format.
Chris21 GTR Process
The next step is to load the file that was produced by the macro into Chris21. Chris21 has a GTR processing form called General Transactions (GTR). To load the file into Chris21 follow these steps:
Step 1: BACKUP. The GTR process will allow you to bulk load thousands of records if required. Before loading any data via GTR it is recommended that you make a backup copy of the file you are about to change, along with any other files that may be affected.
Step 2: Go to the GTR form in Chris21 and open the file that was produced by the macro. To do this, click the Open button on the GTR Input Screen section of the General Transactions form.
Step 3: The Open dialog box will appear. Navigate to the file you want to load. In our example, the file name is “skl add.txt”. Double click the file name to load the file into the General Transactions form. You will be able to see the details of the text file in this window. A quick visual check will confirm that you are about to load the correct file.
Step 4: Click the Process GTRs button. This will start the process that automatically loads each line of the file into the Chris21 Staff Skills form.
As each record is processed, the output will be displayed in the GTR Output Screen section of the General Transactions form.
As the file is being processed, an errors dialog box will appear if the Business Rules Engine (BRE) encounters an error. The record in error will not be loaded and the file will continue to be processed. When the process has finished, you can view the errors individually by clicking the Find Error button on the GTR Output Screen section of the General Transactions form. You can also save the output file by clicking the Save button on the GTR Output Screen section of the General Transactions form.
The data has now been loaded into Chris21.
Verify Data Transfer
It is good practice to verify that the data has been successfully loaded. You should never assume all data has loaded as expected simply because no errors were reported. In most cases the BRE will report errors and ignore invalid records, however this is not always the case.
Always run a report from Chris21 after the data has been loaded and compare this report to the spreadsheet that you processed with the GTR File Conversion macro. This will verify that all data has been loaded as expected.