Skip to main content
The Random field generates a random string once per record, drawn from the character sets you turn on. The value is generated for you, so submitters never type it.
Random is a computed field. Its value is system-generated, the field is always required, and it does not appear as an input a submitter can fill in.

When to use it

Reach for Random when you want an unpredictable token on each record:
  • Access codes, opaque references, or sample identifiers.
  • A short random segment to fold into a Concatenation field.
  • A value where a sequential number would be too easy to guess and a Terminus ID’s fixed shape is not what you want.
Do not use Random when you need a guaranteed-unique value. Random does not check for collisions. Use Terminus ID for a system-unique handle, or Auto Number for a guaranteed-distinct sequence.

How it works

The first time you submit a record, the field generates a string of length characters using the character sets you enabled, then keeps that value for the life of the record. It is not re-rolled when you edit or re-save the record later. You choose which character sets to draw from. At least one of the three must be on.

Settings reference

SettingRequiredDefaultDescription
lengthYesNoneNumber of characters to generate, from 1 to 50.
include_numbersYesNoneInclude digits 0-9.
include_lowercaseYesNoneInclude lowercase letters a-z.
include_uppercaseYesNoneInclude uppercase letters A-Z.
At least one of include_numbers, include_lowercase, and include_uppercase must be true.

Example

An access_code field on a Passes taxonomy:
name: access_code
type: random
settings:
  length: 8
  include_numbers: true
  include_lowercase: false
  include_uppercase: true
A new record might get K7P2QXM9: eight characters of uppercase letters and digits. That value is generated once, when you first submit the record, and stays the same from then on.

Gotchas

  • The value is stable, not regenerated. It is produced once at first submission and kept afterward. Editing the record later does not change it.
  • Random is not unique. There is no collision check across records, so two records can in principle land on the same string. For uniqueness, use Terminus ID or Auto Number.
  • Enable at least one character set. With all three off, the field has no characters to draw from.
  • Short strings collide more often. The shorter the length and the fewer the enabled sets, the higher the chance of a repeat.
  • It is read-only. The value is generated for you and cannot be set or edited in the submission form.