Premium Feature — Available with all Premium Editions of LabKey Server. Learn more or contact LabKey.

This topic describes how to generate Unique Storage ID identifiers, such as barcodes for samples. With the addition of a UniqueID field, the system can generate barcodes for you that are read-only and unique across your application. Once generated, the barcode value assigned to a sample can be used to find it by searching or scanning.

If you already have barcode values in your data and do not want them generated or managed by LabKey, you can use a basic Text field to hold existing barcode values.

Add UniqueID Field

To support barcodes generated and managed by LabKey, you will need a field of type UniqueID in your Sample Type. When you create a new Sample Type, you will be prompted to include this field.

To add a Unique ID field to an existing Sample Type, open it, then click Edit Type. In the Sample Type Properties section, you will see under Barcodes, a blue banner inviting you to create the field necessary. Click Yes, Add Unique ID Field.

By default, it will be named Barcode. If you wish, you can click the Fields section to open it and edit the field name.

Click Save. Barcodes will be automatically generated for any existing samples of this type, as described in the next section.

Generate UniqueID Barcodes

When you add a UniqueID field to a Sample Type that already contains samples, as you finish updating the sample type, you will be prompted to confirm that adding this field will generate barcodes for existing samples.

Click Finish Updating Sample Type to confirm.

In addition, when any new samples are added to this Sample Type by any method, barcodes will be generated for them. You cannot provide values for a UniqueID field and will not see them in a single row insert panel or in the template for importing a spreadsheet. When entering multiple rows in a grid, you will see a grayed out column indicating that barcodes will be generated and cannot be provided.

Barcodes are 9+ digit text strings with leading zeros ending in an incrementing integer value. Ex: 000000001, 000000002, etc. When more than a billion samples are defined, the barcode will continue to increment to 10 digits without leading zeros.

Once generated by the system, barcodes in a UniqueID field cannot be edited and if data is imported into one of these fields, it will be ignored and an automatic barcode will be generated. If you need to provide your own barcode values or have the ability to edit them, do not use a Unique ID field.

Search by Barcode

Once your samples have a populated Barcode column, you can search for the value to locate the sample. You can use the omnibox to search or filter a grid of samples, or use the global search bar in the header throughout the application.

For example, if you scan a tube with the barcode "000000003" (or search the site for that value), the sample will be retrieved in the search results:

Use Existing Barcode Values

If you have barcodes in your sample data already, and do not want them generated or managed by LabKey, you can include a field of type "Text" in your Sample Type, and include them in your imported sample data. This field may be named "Barcode" if you like, but will not be managed by LabKey, or shown as a "Barcodes" setting in the Sample Type definition.

Users can locate samples by the values in this column, but must manage uniqueness and generate new barcode values for new samples outside of the application.

Related Topics

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand allcollapse all