Skip to main content
Field rules and icon rules can read the object a record links to through a Link field, and the objects that link to it. For example: show a field only when the linked plant pole’s owner is a given company, or color a pole green when its plant pole matches. A rule reads one step away. It sees the linked object’s own fields, never the objects that object links to.

What can read a linked object

A rule gives the same answer whether you build it as a condition or write it as an expression, on the web and on iOS.

Build a condition on a linked field

In any condition, open the field picker. Below the record’s own fields are two more groups:
  • Linked: the fields of what this record links to, for example “Plant pole ▸ Owner”.
  • Linked from: the fields of objects whose Link field points at this record.
One linked object. Pick the linked field, then the operator and the value. When nothing is linked, the condition behaves as on an empty field: is is false, is not is true, is empty is true. A list link. Pick the list, then choose any linked, every linked, no linked or how many linked. For the first three, pick the linked field. Every linked is false when nothing is linked. How many linked compares the number of linked objects, for example “more than 1”. Any object. For a field that links to any template, the picker lists every template in the configuration, for example “Anything ▸ Plant pole ▸ Owner”. The rule then reads “the linked object is a plant pole and its Owner is …”. A linked object of another template doesn’t match, and is never an error. Linked from. This is always a list: choose any, every, no or how many, then the field. For example, “any new pole linked to this plant pole has Owner Power Co”. To check a rule before you save it, use Try it in the form preview, or Linked objects in the icon simulator to link real objects from the job.

Write an expression

Expressions read links.<Link field name> for what the record links to, and linkedFrom.<template name> for what links to it. linkedFrom is always a list.
Use ?. and ??. An expression that reads through an empty link without them stops with an error. The rule then fails open, and a calculated value is left empty. A calculated value is stored with its record, so Cloneable keeps it current on the server:
  • when the record is saved;
  • when an object it links to, or an object that links to it, is saved.
The recomputed value syncs to the web and to phones like any other edit, with history. The server’s value wins. Limits:
  • A recompute caused by another object’s save doesn’t set off further recomputes.
  • One save recomputes at most 200 linked records. The rest catch up the next time they are saved.
  • A calculated value can’t read a linked object’s calculated value that is itself calculated from links. Saving the template is refused with a message that names the field.
  • If the linked object can’t be found (archived, or not loaded), the stored value is kept. Clearing the link recomputes it, usually to empty.

When something is missing

Other rules and icons keep working in every case. Some places look at one record at a time with no job loaded: the KMZ export, and a record opened on its own page. There, linked reads count as missing, and calculated values keep their stored value.

Older iOS apps

An iOS app from before linked rules shipped can’t read linked objects. On that app, rules that read a link fail open: the field is shown and not required. The server ignores what an old phone writes to a calculated field that reads a link, and keeps its own value. Ask crews to update the app.