Products
  
  
  Crash Magic Online
  
  Intersection Magic
  
  Map Magic
  
  Knowledge Base
  
  
  
  Contact Us
  
  Meeting
  
  Shop
  
  Login
  

 

Knowledge Base Article:IMW157 


Registration keys moved to client area: Select login on the left menu bar.

Knowldegebase:
Search home page  

Import behavior for Intersection Magic with Null and unknown values.

Article created: Mar 02 2005, updated: Oct 31 2005

Background:  To claify the behavior for Intersection Magic during Import.

Status:  Info - functionality description
Keywords:  Import,null,zero,unkown
Categories:   *Installation and setup* *Configuration* *Importing* *Data*

Explanation:

Null and zero are not the same value. Null was never entered. Zero is a definite number. We have an entry for that the field with a zero. Null is the equivalent of saying "I don't know."

For Intersection Magic null values are blanks in the file that you are importing. They are treated as null values on import. Data in Intersection Magic's database is stored as numbers. The changes file (*.cng) changes any known text values on import to numbers. The lookup file (*.lus) is used to translate the numeric values that are stored in the IMW database to the text you see in reports.

The Importer will copy null values directly to the IMW database. When unknown values are encountered they will be logged in the CGFAIL.log, and a value of zero assigned to them in the IMW database. Example a null value for vehicle one citation will show as blank value in the Raw data on IMW reports, and value that is unknown to IMW will show as zero if you select Raw data on the same report.

 



Solution:

As a rule you should avoid using the zero value in your lookups file, but under some cases zero can be useful. Zero can be used if you were only interested in a few key import values in a field of your data.  If you were only concerned about a portion of the citations, and only wanted to know a vehicle citation was issued for any other violations this could be done with a zero lookup value. We could set the key values for moving violations in the changes file (*.cng) and set the values for the Lookup file (*.lus) labeling zero for “Unknown Citation”.

Here is an example:

We enter the following into the changes file.

VEH1CITATION 1 622A
VEH1CITATION 2 693A
VEH1CITATION 3 1381A1


The following lines are already in our lookup file

VEH1CITATION
   0 Unkown Citation
   1 Traffic control device
   2 Serious moving violation
   3 DUI

The importer would store a value of 3 in the Intersection Magic database for each "1381A1" that was imported for the VEH1CITATION field.

If the importer encountered a value of 4139A in the citation field it would check the changes file. The value is not listed in the file. The importer would store 0 in the database for that field, and make an entry in the CGFAIL log.

We would know that a citation is entered for that vehicle, but we would not know what the citation was for.


September 19, 2018 1:10AM

© 1999-2018 Pd' Programming, Inc - Lafayette, CO USA