Computed Number

How to add and configure a Computed Number field in the Notebook Editor.


What This Field Does

A Computed Number derives a number from an expression over other fields in the form (and, for child records, fields on the record’s parent) — for example, multiplying a mass field by a count, or averaging two measurements. The generated value is read-only for data collectors; they see the result but cannot edit it, and it updates automatically as the fields it references change.

The field stays blank until every field its expression references has a usable value, so a partially filled form shows no result rather than a misleading one.

Adding the Field

To add this field, open the ADD A FIELD dialog, navigate to the NUMBERS tab, and click the Computed Number card. Then click the ADD FIELD button in the lower right.

Adding a Computed Number — the NUMBERS tab in the ADD A FIELD dialog

Configuring the Field

Click the field’s grey header bar to expand it and see its settings. For an overview of the settings shared by all fields — including Label, Helper Text, Field ID, and the field toolbar — see Field Identity and Field Toolbar.

Give the field a meaningful Label, review the auto-populated Field ID, and add any desired Helper Text.

Computed Number configuration in the {{Notebook}} Editor

Computed Number-Specific Settings

The Computed Number’s key feature is the Expression text area, which defines the calculated value. Each referenced field is written by wrapping its Field ID in braces, e.g. {Wet-Soil-Mass-g} * {Number-of-Samples}. Below the expression, a searchable field picker lists the referenceable fields in the form; selecting one inserts that field’s reference, which avoids typing the Field ID by hand.

Setting

What It Does

Expression

A text area where you define the calculation using literals, operators, and field references in single-brace syntax (e.g., {Width} * {Height}).

Insert field

A searchable picker of the referenceable fields in the form. Selecting one inserts its braced reference into the expression.

The expression is typed and checked when the notebook is designed — mixing types is reported as an error in the Editor. The overall expression must produce a number. The operators are:

  • Arithmetic (+ - * / % ^, where ^ is exponentiation) — numbers only, with parentheses and a leading minus.

  • Concatenation (&) — text only (useful inside conditions).

  • Comparisons (< > <= >=) — two numbers or two texts, producing true/false; equality (==, !=) requires matching types.

  • Logic (&&, ||, !) — true/false values only.

  • Conditionals — a ternary condition ? ifTrue : ifFalse, e.g. {Depth} > 0 ? {Depth} * 12 : 0. The condition must be true/false and both branches must have the same type.

Text and checkbox fields can be referenced anywhere in the expression — only the final result must be a number. For example, {vegType} == 'plot' ? 3 : 5 is a valid Computed Number.

Referenced fields are normally in the same form as the Computed Number; fields on the record’s parent can also be referenced (see below). A Computed Number cannot reference another computed field or a Templated String in the same form.

Referencing Parent Record Values

When the form is a child of another form (linked through a Child-relation Related Records field), the expression can reference fields on the record’s parent by prefixing the Field ID with _PARENT., e.g. {_PARENT.Calibration-Factor} * {Reading}. An Insert parent field picker below the expression lists the available parent fields.

Parent references are type checked like any other reference, and — unlike same-form references — may point at the parent’s computed fields and Templated Strings, whose stored values are used.

If a record has no parent, a parent reference has no value and the result stays blank, matching the behaviour for missing same-form values. The computed value is stored on save and re-derives whenever the record is next opened or saved; if the parent changes in the meantime, the stored value reflects the parent as of the record’s last save.

The same reference can be used in field and section conditions.

Referencing Linked Record Values

When the form holds a Related Records field with a Linked relation that allows only a single link, the expression can reference fields on the linked record by joining the two Field IDs with a dot: {Link-Field-ID.Field-ID}. For example, with a Related Records field Core-Calibration linking one Calibration record, {Wet-Mass-g} - {Core-Calibration.Cutter-Mass-g} subtracts the linked record’s cutter mass. An Insert linked record field picker below the expression lists the available fields.

Linked record references are type checked against the linked form, and may point at the linked record’s computed fields and Templated Strings, whose stored values are used. Fields that allow multiple links, and Child-relation fields, cannot be referenced this way (children reference their parent with _PARENT.); the editor reports these with a specific error.

If nothing is linked, the reference has no value and the result stays blank. The value updates while editing whenever the link is changed, and otherwise re-derives when the record is opened or saved — if the linked record changes in the meantime, the stored value reflects it as of this record’s last save.

The same reference can be used in field and section conditions.

Referencing Notebook Metadata Values

The expression can read a value from the notebook’s custom metadata (the custom fields on the Info panel in the Notebook Editor) using the _METADATA. prefix: {_METADATA.Field-Name}. An Insert notebook metadata picker below the expression lists the available fields.

Every metadata value is text, so a metadata reference is typed as text: it can be compared and used in conditionals (for example {_METADATA.units} == 'imperial' ? {Depth-in} * 25.4 : {Depth-mm}), but not used directly in arithmetic. If the notebook has no custom field with that name, the editor reports an error; at run time a missing value leaves the result blank. A custom field that an expression references cannot be removed from the Info panel until the expression is changed.

Shared Field Options

Configure any of the shared field options as needed.

For settings shared across all field types — including Annotation, Uncertainty, Conditions, Copy value to new records, and Display in child records — see Field Options.

Tips

  • Use the field picker to build expressions rather than typing Field IDs by hand. Selecting a field inserts the exact braced reference, so you avoid typos and do not need to remember a field’s ID.

  • The result stays blank until all referenced fields have values. This is intentional — a partially complete record shows no value rather than a misleading partial calculation.

  • Type mismatches are reported in the Editor — if an expression mixes types (e.g. multiplying a text field), fix it before publishing.

  • Computed Numbers are read-only for data collectors. They see the calculated result but cannot edit it, keeping the value consistent with its inputs.