Field References

Every field (also known as a 'question') in a smart online form has a unique reference code that identifies it. In the builder, a field's reference code can be found directly below the Field's "Edit", "More Actions" and "Delete" buttons.

If you need to copy the reference code for use in logic, calculations or as a token, simply left-click on the reference code.


References in Logic and as Tokens

When displayed as part of a logic expression or as a token, field references start with an "@" and are wrapped in square brackets (eg, "[@123456789]").


References in Calculations

When used in a calculation, field references are not wrapped in square brackets (they still start with an "@").


Base references

When a field is within a section that is not repeatable (see repeatable sections) or a field within a repeating section is referenced (using logic, a calculation or token) from within that repeatable section, the type of field reference used is a "base reference". All of the examples above demonstrate base references.

We use the term "base reference" to differentiate this type of reference from "composite references".


Composite references

A composite reference is a reference to a field within a repeatable section from outside of that repeatable section (ie, in a subsequent section). It is composite as it contains the two parts:

  1. the base reference of a field within a repeatable section, and
  2. a number that indicates which repetition of the field to use.

The repetition number is appended to the end of the base reference with a tilde (~). For example, a field with the field reference @123456789 has the following composite references:

  1. @123456789~1 for the first repetition,
  2. @123456789~2 for the second repetition,
  3. @123456789~3 for the third repetition, 
  4. @123456789~4 for the fourth repetition,

and so on.