When working with cases in CSPro, a case's
key is typically used to identify a case. The key is created by concatenating the values of the case's
identification items together into a string. The value of each identification item is formatted using that item's
Length and
Zero Fill properties.
However, CSPro
data sources use other identifiers to uniquely identify a case, partly because a case key may not be unique if a data source allows duplicate cases.
Each data source uses a
position to identify the "location" of the case in the data source. This position is always unique to the data source, but a case's position may change when cases are modified. For example, the position of a case in a
Text data source indicates the offset in the text file where the case is located. This position could change if a case located prior to the case were deleted.
Some data sources use a
UUID, a universally unique identifier, to identify a case. A case's UUID can be retrieved using the
uuid function. Unlike position, once automatically generated, a case's UUID does not change. Because the UUID is unique and does not change when the case key changes, it can be used to refer to a specific case. This remains true even as the case is modified.
The following table describes these identifiers as used by CSPro's main data sources:
| Data Source | Key | Position | UUID |
| CSPro DB | not unique, duplicates allowed | unique, constant | unique, constant |
| Encrypted CSPro DB | not unique, duplicates allowed | unique, constant | unique, constant |
| Text | unique | unique, can change | unique, constant |
| JSON | not unique, duplicates allowed | unique, can change | not used |
| CSWeb | not unique, duplicates allowed | unique, constant | unique, constant |
Note that it is possible for a Text data source to contain cases sharing the same key. For example, multiple data sources concatenated using the "
file contents" could result in duplicate cases. If so, this Text data source would not be usable by some CSPro functions because an
index cannot be created when the keys are not unique.