| InfoToday Tools for Visual Rams |
| Importing using the Import Tool |
There are two ways of importing a file. One is to use the special import menu which has been setup for importing into specific tables in Rams. The reason for this is that the API incorporates the Rams specific logic for certain RAMS tables but not for all. Hence the Import menu covers the tables which DO have RAMS logic built in. This menu is shown below.
For all other tables you need to select the 'Import' menu item which appears when you right click on the specific table whilst in the 'Data View' as shown below.

For our example we are going to use the 'Customer' import menu. Under the ‘Import’ menu select the ‘Customers’ item. This will present the following screen;

Fields Explained
Import File
This may be either an XML or DBF file. Fields in these files which match Rams fields will be updated as they are imported.
Default Values Record
This is the Account number of the customer you created which holds the default values to be applied to the records being imported.
Import ID Field
This is the name of the field in you import table which uniquely identifies customers. This is only necessary for import tables which have multiple records for a single customer. As in the case where the import table has a record for each bin.
XML Node
When importing XML files if your data is further than one level into the file you will need to specify the name of the node under which the data lies. This is case sensitive.
Ignore Fields
Your import table may have fields in it which have the same name as a customer record field but in fact are intended as fields for another table. For example you may have a field called 'Type' which is intended as the container type but if not set to be ignored, will be applied as the customer type.
ID Query
In some cases, you may be importing records which do have existing records in Rams but for which you don't have the PK value supplied. In this case you can use this test to define a query expression which tells the import program how to match import records to existing records. For example, if you are importing route records and you don’t have an existing Route ID but you know the account number and system for which the records should be matched. In this case you can specify the following expression.
Account == {account} and system == {system}
The import program will query the route table with this expression. If a match if found then it uses this record as the match for the record being imported. If no match is found then a new record is created.
Use New PK Values in Import File
If this is selected then the import program will use the PK values for the PK field as specified in the import file.
Table PK Field
In most cases this will be filled in for you. However if you are importing into a generic table you will need to specify the name of the PK field in the table.
Add new Street Names
As the import proceeds it will try and validate the Street Name. If you check this option, the import program will automatically add the new street name to the street table.
Continue on Error
As the table is imported the program may come across errors on some records. If this option is checked the program will continue importing the remaining records and log the errors found.
Use Hook Server
If this is true then the hook server program file will be called to carry out any specific functions you have included.
Validate on Save
In rare circumstances you may know that the data in all the fields is correct. In this case you may want to switch off record validation. Switching this off significantly increases the speed at which data is imported. You should only turn this off in extreme circumstances.
Equivalent to lo.lvalidateonSave = .T.
Record Validate
If you select 'Validate on Save' then you can optionally include record validate. Having this on will validate each field being entered.
Equivalent to lo.lrecordvalidate = .T.
Pre Save Logic
If you select 'Validate on Save' then you can optionally include Pre Save Logic. Having this on will cause the RAMS presave logic to be applied.
Equivalent to lo.lpresavelogic = .T.
Post Save Logic
Having this on causes post save logic to be performed.
Equivalent to lo.lpostsavelogic = .T.
Start Import
This starts the import process
Cancel
This cancels the import process once started.