Skip to main content

Codes and names

Most records you create in Erde carry a short Code you assign, and usually a Name as well. The Code is the unique identifier — like MW-01 or LR-2026-001 — and it is what Erde matches, links, and references on. The Name is a longer, human-friendly label that does not have to be unique. Knowing which is which explains why two records can share a name but never a code, and why a picker lists the record you expect.

Code identifies, Name describes

For the records you identify by a Code — Sites, Locations, the field artifacts (Wells, Boreholes, Test Pits, Sediment Cores), Samples, Projects, Programs, Lab Reports, Chains of Custody, and Equipment — the Code is unique within its scope. Where the record also has a Name, that Name is free text with no uniqueness rule: two Locations can both be named "Upgradient well", but they cannot share the code MW-01. So Erde keys on the Code — references, lookups, and imports all match by it.

AspectCodeName
PurposeThe unique identifierA human-friendly label
UniqueYes, within its scopeNo
RequiredYesVaries by record
Erde matches on itYes — links, lookups, importsNo

Where a Code must be unique depends on the record. A Project or Equipment code is unique across the whole installation; a Location code is unique within its Site, and a Lab Report or Chain of Custody code is unique within its Project. Codes are matched case-insensitively, so MW-01 and mw-01 are the same code.

Code vs. External ID

The Code is the identifier you assign and read. It differs from the External ID — the stable UUID Erde uses in the API and in page URLs. You work with Codes; the system uses External IDs under the hood.

In the interface, grids show the Code (compact and unambiguous), while pickers, page headers, and the Activity Timeline show Code — Name together, giving you the unique identifier plus human context where there is room for it.

Allowed characters in a Code

A Code may contain ASCII letters (AZ, az), digits (09), and the period (.), hyphen (-), and underscore (_). It must have at least one character, and it may not contain spaces or any other special character. Erde trims surrounding spaces before saving. Valid examples: MW-01, LR-2026-001, OU_3.

Codes stay ASCII because they are joined to other data, exported to CSV files, and embedded in URLs — a restricted character set keeps them portable. If you enter a disallowed character, Erde rejects the save with: "Codes can only contain letters, numbers, periods, hyphens, and underscores (no spaces or special characters)."

The measurement-unit exception

Measurement Unit codes are the one relaxation. They also allow the slash (/) and the percent sign (%), so real-world notation like mg/L, mL/min, and % works as a code. They still exclude spaces and typographic characters such as ° and ³ — a unit's display Name can show those, but its Code stays ASCII.

Reference data keys on the Name

Reference data — Analytes, Methods, the Measurement Unit list, Matrices, Site Types, and the other shared lookups — inverts the rule. There the Name is required and unique, and the Code is unique when set. Whether the Code is required depends on the type: most classification lookups (Site Types, Location Types, and the like) leave it optional, while some — the lab Methods, Measurement Units, Analyte Groups, Matrices, and Detection Limit Types — require one, because for those the Code is the operational identifier labs and EDDs key on. So you look reference data up by its Name, with the Code as an identifier where the type calls for it. The character rule above still governs that Code.

A record's Code is also distinct from the fixed Code values built into Erde's enumerations — values like the Sample type N or the status Draft — which come from a closed set you cannot edit.