Using unique fields, Precautions when using csv files to share data – Interlogix TruPortal User Guide User Manual

Page 13

Advertising
background image

TruPortal Import/Export Wizard User Guide

5

Before You Begin

Using Unique Fields

The Import Add/Update Persons and Credentials, Delete Persons, and Delete Credentials options that
are available on the Operation page of the Import/Export Wizard all have a

Unique

check box on the

Layout

page. Selecting this check box designates the associated database field as unique for purposes

of searching and matching records when making updates, additions, and deletions.

The unique field is limited to those default and user-defined fields associated with a Persons record
(that is, not those fields associated with either a user account or credential ID). The unique field is
used to search the database for records matching those in the CSV file. If a matching record is found,
it is updated with the values in the CSV file. If a matching record is not found, then a new person is
added to the database. If more than one persons record has the same value in the field marked as
unique, then the first record found will be updated or deleted.

Precautions When Using CSV Files to Share Data

A CSV file is a plain text file in which each line represents a row in a table, and the commas in each
row indicate the columns. As shown below, the first row of the file is the key containing the field
labels for the data in the file:

First Name,Middle Name,Last Name,Picture,Person ID

"Fredegar","","Bolger","","1003"

Some computer operating systems will assign a spreadsheet application as the default editor for CSV
files. Since spreadsheets are designed for mathematical processing, many spreadsheets treat numbers
in a CSV file as integers, instead of as text, and will remove any leading zeros.

This poses a problem if numeric data is used, such as a United States Social Security Number, as a
Unique Field for persons records. Many Social Security Numbers begin with a zero. The System will
treat such an all-numeric datum as text, but a spreadsheet will treat a Social Security Number as an
integer (if it is typed without the dashes) and remove any leading zeros. For example, Microsoft Excel
will remove the leading zero from the Social Security Number 012345678, but will not change the
Social Security Number 012-34-5678 because of the dashes.

IMPORTANT:

If leading zeros are used in all-numeric unique identifiers, such as person IDs,
be sure not to edit a CSV file in a spreadsheet or other program used for
processing or analyzing numeric data. If the spreadsheet strips the leading
zeros from those entries that have them, then when the data is imported to the
System, the unique identifier will not match and the application will insert that
persons record as a new entry in the database instead of updating the existing
entry, leading to duplication.

Advertising