An Auto-fill field derives its value from other fields on the same row. In its simple form it copies one field and reshapes it (case, spaces, a fallback). In its expression form it combines any number of fields with literal text, transforms, and if/else logic. Like every computed field, submitters see the result but never type into it.
When to use it
- A slug-safe copy of another field: Campaign Name, but lowercase and dash-separated.
- A value that needs a fallback when its source is empty.
- A code that varies by condition: one prefix when the platform is DV360, another otherwise.
The two modes
The editor’s Auto-fill settings section has a two-way switch:- Copy a field takes one source field and applies optional transforms.
- Expression evaluates a template that can reference many fields.
Copy a field (simple mode)
The value is computed as: read the source, substitute the default if the source is blank, then apply the case and space transforms. The default is transformed too: a default of
Not Set with UPPERCASE yields NOT SET.
Expression mode
An expression mixes literal text with field references written as{{ handle }}, using the field’s handle. The syntax is the Liquid template language, restricted to a safe subset.
The editor offers two views, switched with the Visual and Advanced buttons:
- Visual shows field references as pills carrying the field’s display name. Type
/or click Insert field to add a field, and click a pill to attach transforms from a menu: Lowercase, Uppercase, Capitalize, Trim spaces, Remove spaces, Spaces to dashes, Spaces to underscores, Truncate, Fallback if empty, Replace, Add prefix, Add suffix. - Advanced is the raw expression text. Everything Visual can build, plus conditionals (
{% if %},{% elsif %},{% else %},{% case %}) and the full filter set. An expression that uses features Visual cannot show (any conditional, for example) stays in Advanced, and the Visual button is disabled.
upcase, downcase, capitalize, strip, lstrip, rstrip, replace, remove, append, prepend, truncate, slice, default, and date. Loops and includes are not available, and any other filter is rejected. An expression can be up to 2,000 characters and its rendered output up to 5,000.
Below the editor, Preview with sample values gives you one input per referenced field and renders the result live, through the same engine the submission pipeline uses, so what you see in the preview is what records will produce.
Which fields can be referenced
Both modes accept single-value fields: Text, URL, Date, single-select Dropdown, Constant, Auto Number, Random, Terminus ID, and other Auto-fill fields. Compound fields (Concatenation, Tagged URL, Short URL, QR Code) and multi-select dropdowns cannot be sources; build from the same primitives instead, or reference the Auto-fill from the compound field. Circular references are rejected when the model is validated or published.Other settings
Auto-fill is a computed field, so Required is locked on and submitters cannot edit the value. A Prefix and Suffix are allowed and are wrapped around the computed result. There is no Require unique values setting; if the value must be unique, use a Concatenation field instead.A worked example
A campaign code that shortens known platforms and slugs the campaign name, built with Expression in the Advanced view. It uses the handles of a Platform dropdown (platform), a Region dropdown (region), a Campaign Name text field (campaign_name), and a Sequence auto number (sequence):
dv360, Region EMEA, Campaign Name Black Friday Sale, and Sequence 00042, the field computes:
{{ region | downcase }}-{{ campaign_name | downcase | replace: ' ', '-' }}, is fully editable in Visual mode as two pills with a - between them.
Gotchas
- Switching modes wipes the other mode’s settings. Moving from Copy a field to Expression discards the source and transforms; moving back discards the expression.
- Expressions reference fields by handle, so renaming a handle breaks them. Publish is blocked with “Autofill expression references unknown field” until every affected expression is updated.
- A broken expression saves but does not publish. The field editor accepts any text; invalid syntax or a disallowed filter is caught when you validate or publish the model, and a failure at submission time marks the cell “Autofill expression failed to evaluate” and blocks approval.
- An empty result blocks approval. Auto-fill is always required, so an expression that legitimately renders nothing makes the row invalid. Give it a fallback: the Fallback if empty transform, or the Default value in Copy a field.
- Truncate counts the ellipsis. The Truncate transform is Liquid’s
truncate: the three trailing dots it appends count toward the length. For a plain “first N characters,” useslicein Advanced mode. - A referenced field must be in the same taxonomy to have a value. The picker offers fields from the whole governance model and marks ones missing from the current taxonomy; referencing one of those yields an empty value on this taxonomy’s records.
- The builder shows most values as you type. Copy a field and expressions made of field references, literal text, and filters update live. An expression that uses a tag such as
{% if %}, or thedatefilter, is worked out only when the row is saved; until then the form shows “(will be generated on save)”. - Values are recomputed on every save. Editing the expression changes what newly saved rows produce. Approved records keep the value they were approved with.
Related
- Concatenation field: fixed-shape joining, with uniqueness.
- Constant field: a fixed literal value.
- Text field: the same case and space transforms, applied to typed input.
- Fields