Import supervision history from an external XLS file
Introduction
The document describes the mechanism for importing the history of supervision changes from an external data file. Sometimes it happens that the system is launched already during the implementation of some supervision process. Coordinators already have existing progress reports in the form of various forms/spreadsheets. The supervision progress history importer in the AMAGE system allows you to import these data and enter them as history records in the system, which facilitates further use of the application.
Description of the issue
In the AMAGE/AMAGE24 system, we have the ability to register supervision of any data flow based on records imported to the system. Importantly, these records can be performed by many people simultaneously with a full record of the history of changes. This is already a significant advantage over the various versions of spreadsheets in which this data is saved. However, it often happens that the AMAGE system is launched when some data is already stored in such a spreadsheet.
These data can be entered manually, just like regular registrations - if the user has super-administrator rights, he can do it together with the indication of the person and date of performing this operation.
However, if there is a significant amount of this data, we can use the importer mechanism to enter this data. This tutorial shows how to do it using cable works as an example. The cables are laid and information on laying, A/B ends connections and final checking of a given cable (according to procedures/standards) is recorded there. Such supervision has been implemented in the system, but we have historical records stored in an Excel sheet and we want to import them as records.
Data preparation
In the description of this example, we will omit the method of preparing the supervision template and definition mechanisms. Please refer to the documentation and other tutorials to perform these operations.
Nevertheless, one of the important operations is, apart from importing records (in this case, cables), starting supervision initialization for these cables. We define this in the supervision module and template definitions. In this example, we add a rule so that all elements in the system whose element type has the Cables
category are initialized with supervision according to the Cables
template. After defining such a rule, we can do it using the presented actions.
There is an automatic device, which activation will result in automatic initialization of supervision for new records, if they are imported and meet the above-mentioned rules (type category). See the instructions for automation/schedulers on how to do this. |
History data import
We come to the main goal of this tutorial. Select the system configuration section and go to the data importer. There we select 'Supervision History' as the action we want to import.
The importer presents basic information and a few steps. See the user manual to learn more about data importers and general options. Here we only describe the mechanism and functions that we use in this particular case.
We load the spreadsheet from which we want to import the history. In our case, we load it and mark that the data is from the third row.
Additionally, check to use Name to map existing records.
This setting is important in case we want to import this sheet again. During the import, the system treats each row in the sheet as a separate record. For each of these records, it searches the system for whether the record exists. Due to the large freedom of data entry, we can define rules according to which the machine will search for exactly one record into which the supervision history will be loaded (in this case). |
We can specify three elements by means of which we will designate exactly one (!) record in the system to which a given history will be loaded. These options can be combined (add up):
-
Use name to map - use item name to search
-
Use the serial number - as above for the serial number
-
Use inventory number for mapping - as above using inventory number
In our case, we want to import the history of changes to the system (cable laid, connected). We also record the person registering the data and the date/time of data entry. In addition, the sheets contain additional data that can be saved in the AMAGE system as observed parameters. This data can also be imported into the system.
We select additional parameters and define them. We indicate in which cells of the sheet they are located.
In this case, we are importing two data:
-
Length laid - cable length that was laid during the laying procedure - entered by the worker
-
Drum - QR code - code of the drum from which the cable was laid
We show it on a spreadsheet. Column E stores information about the stacked length. This is how we define it in data import.
Column E - Cable pulled → Length laid
Observed parameters are defined. We go to the main import section.
We map the remaining columns. Columns already specified as watch parameters are marked in red. Columns that we have selected for import as a data source are marked with green color.
Sometimes it happens that in an excel sheet we do not have some data that we want to use. This data is constant in each data record. We can additionally define it in the Default values
tab. Here we have added the name of the supervision template that we will use for this. Each record will have the Cables
value set for the Template - name
parameter.
We can proceed to the data import.
Data import
In the AMAGE system, we can perform a test import before data import. To do this, select the Test run' option. DO NOT IMPORT DATA.
and we import.
With the help of messages, we can see the progress and entered records. Potential errors or apparent configuration errors are also displayed here.
We call the final data import. The data is saved in the system.
The completion of the import is indicated by a green progress bar.
Once the import is complete, we go to the main system and see that historical data has been imported. The supervision status of individual cables has changed and indicates the data from the excel sheet.
If we want to re-import the data from the spreadsheet, the system will show information about the existence of such a history record, indicating the row in which it occurs.
After the imports are completed, we have full information transferred from the spreadsheet to the system.
If we see the details of a given record, the full historical record will appear in the records along with the parameters that we wanted to monitor.
Such an operation can be performed by modifying the imported data (rows) several times, so as to import subsequent states and information.
Finally, this import is as follows. All historical data has been imported and is shown in the system for the corresponding cables.
Import and all actions completed!
This Howto is based on system version 1.21.1.0 (06.2023) and presents features that may not be available on your system. Ask AMAGE to provide this functionality. |
Due to ongoing development of the system, some screens or configuration files may look slightly different, but will still retain the full functionality described here. This does not affect the core functionality described in this document. |