File import program
This option allows the user to setup the parameters of a comma delimited file that can then be imported into Rx-Universe. The file can update existing data or add new data. The program is accessed via “RP” and is called RXMCONV”. The following screen appears:
When importing, Rx-Universe must know what data is contained in the file, and in what column, and then match it to the appropriate information in Rx-Universe. To set up this rule or mapping, use the “+” button to create a new import rule or the pencil to edit an existing rule.
Setting up an import definition
Pressing create or modify causes the import file definition screen to appear.
This screen allows the user to maintain a file import definition. The “Conversion name” and “Conversion file type” fields cannot be modified after the definition is created.
Available fields:
Conversion name - enter a unique name for this conversion.
Conversion file type - this field determines the type of information that can be imported, the allowable types are:
Lens Inventory
Description - enter a description for this conversion
Number of header records - Enter the number of lines that contain header information within the CSV file
Conversion file column definition list
This is list is maintained by pressing one of the buttons to the right of the list. You may Add, Modify or delete entries. The list has the field that is contained in the CSV file, its column number within the file, and optionally, any conversions from the CSV file to the Rx-Universe data.
The import field definition screen allows the user to select the field name, its column position and any conversion to the data that may be required. You can enter a duplicate field only if the column numbers are the same (this allows for multiple field value conversions). If you enter a column that has already been assigned to a different field name, an error will appear and you will need to select a different column.
Running an import
Select the desired conversion, then enter a CSV file name, either by typing in its full path, or by using the search button to the right of the field to select one. Once the desired information has been entered, press the “Process” button to start the conversion.
Types of Imports
Lens Inventory
When setting up an import for lens inventory, the CSV file and the import definition must contain an OPC code field. This will be the key to find inventory entries within Rx-Universe. The lens inventory will be checked to see if the OPC entry exists. If it does not, then the “Lens Catalog” is checked to see if the desired OPC is available and, if it is defined in the Lens Catalog file, the item is activated (along with any other associated lenses in the same line of the lens catalogue) and its stock status is set to the value contained in the CSV file ( if a definition for the status field is available). If no status is defined in the import file, the item is set to “Stocked”.
If the Lens inventory contains the OPC from the CSV file, any other field definitions are modified within the Lens inventory item and the record is saved with the new values. The conversion/import program also creates an error file “CSVERRORS.TXT” that contains a copy of the records whose OPC code could not be found.