The Subject Key
Applies to: Version 4
Version 4 introduces the concept of a "key" for each subject. (Keys are also used with respect to jobs, folders and other areas of the software but this article will focus on subject keys).
The key is an automatically generated 8 character code that uniquely identifies each subject in the database.
- is derived from a possible 32^8 combinations (109,951,162,776)
- Is automatically generated each time a subject is created in the database
- Cannot be modified, added or removed by the user
- Cannot be duplicated
- Is used to log into the Timestone Software's Internet Ordering System
- Can be used in place of the traditional unique field to find a subject
- Can be printed onto the subject's products
How does the key differ from the subject's unique field ID?
The traditional unique field (often referred to as the subject's ID) uniquely identifies a subject within a job. It is usually a user defined value. (In school photography the ID is often supplied to the photographer by the school for example). It is possible for subjects in different jobs to have the same ID
The subject key uniquely identifies a subject within the entire database and therefore across all jobs. It is generated by the software, not the user. It is not possible for two subjects to have the same subject key even if they are in different jobs.
The following two screen grabs show subject John Smith in two different jobs. Note the different key.
Using the subject key to find a subject
The subject key can be used in the same manner as the unique ID to find a subject. To encode the subject key into a barcode use:
The barcode can be used to find a subject in any area of the software regardless of which job is open or even if no job is open at all.
The barcode can also be used to find a subject in CapturePost (version 4.0 and later).
Displaying the subject key on a layout
The subject key can be printed on any subject specific product by adding a text object encoded with @key
Exporting the key into a tnj
The subject key is preserved when an SQL job is exported to tnj with File>Export to tnj. This not only allows the /%K@key barcode to be used with CapturePost but also ensures the subject is properley merged when and if the tnj file is merged back into the original SQL job.
MySQL Error (1062): Duplicate entry 'xxxxxxxx' for key' Subjects_SubjectKey'
As stated, subject keys are unique for all subjects across all jobs. It is not possible for the same subject key to be in the database more than once.
When an SQL job is exported to tnj file the subject keys are exported with it. If an attempt is then made to import the tnj file back into the database as a new job (using File>New from tnj) the user will encounter the MySQL error above. This error occurs because one or more subject keys in the tnj file already exist in the database.
There may be legitimate reasons why a user may wish to re-import the tnj file as a separate job (as opposed to merging the tnj file into an existing job with File>Merge). For these occasions it is possible to reset the keys when importing the tnj file by checking the option "As independent job (Note this will allocate new keys to subjects, folders etc)" located at the bottom of the window.
Using the subject key with Timestone's Internet Ordering System (IOS)
Keys and in particular subject keys are paramount to Timestone Software's online ordering system. The subject key is used to locate a subject in jobs uploaded to the system and either display their images for ordering or in the case prepay/pre-order jobs allows for orders to be placed prior to photography.
To see how the subject key is used go to the Timestone Software demo site at the following link and enter the subject key below.
Subject key: YZDT7A7R
End of article
Installation and licensing
Internet Ordering System - IOS
Images and Data
tsPortal and tsArchive