Configuring ID Sequences
In this section
This section will help you:
Understand why each Entity Type needs a unique ID Sequence.
Know how to create a new Entity ID Sequence.
Entity ID Sequences
The default Entity ID Sequence for all new Entity Types is the ESP Sequence
. This will generate a unique Entity ID in the following format: ESP000001, ESP000002, ESP000003, etc. However, you should replace this selection with your own custom Entity ID Sequence. Why?
Each Entity needs a descriptive ID so the End User knows what they are looking at.
The same ID Sequence should not be assigned to more than one (1) Entity Type.
How to create a new Entity ID Sequence
New Entity ID Sequences are created in the Configuration app.
Note
The steps below describe how to create Entity ID Sequences. This process also applies to Items and Experiments, except the sequences will be entered in the “id_sequences” block rather than the “lims” block.
Go to: Configuration app → Selected Configuration = esp → lims block → sample_id_sequences
format - defines the ID Sequence (free-form text and supported arguments).
name - the name of the sequence in the Entity Types builder.
sequence - the name of the sequence in the database.
Next, you must tell L7|ESP what sequence_number
to assign to the next Entity created using this ID Sequence.
Go to: Configuration app → Selected Configuration = esp → sequences block
Use the the database sequence name created in the “lims” block.
Note
Both blocks must be updated for the Entity ID Sequence to work properly.
Now you can assign the newly created Entity ID Sequence to an Entity Type.
Go to: Builders (L7|Master) → Entity Types → Entity Type details page → Entity ID Sequences tab
Note
Recall that more than one (1) ID Sequence can be assigned to an Entity Type.
How to remove an existing ID Sequence
First ensure that the ID Sequence is not assigned to any Entity Types in L7|Master.
Then navigate to the Configuration app and delete the ID Sequence from the sample_id_sequences
section of the lims
block, and the corresponding sequence key and value from the sequences
block.
How to edit an existing ID Sequence
Navigate to the Configuration app and edit the ID Sequence in the sample_id_sequences
section of the lims
block.
If the sequence
key is changed, consider what sequence_number
should be assigned to the next Entity created using this ID Sequence. New keys will start counting at the value specified.