Tinderbox v9 Icon

Defining an 'item' object—a single item—in action code

The term 'item' is not a Tinderbox definition but is useful in the context of discussing action code and documenting action code usage.

Where an argument is defined as item scope this means it returns one and only one object (as compared to a group scope). If more than one item is returned where only one is desired, e.g. from a find() query) Tinderbox will use only the first item of the list, by ascending $OutlineOrder, as the specified item; the same holds for an expression that evaluates with an ambiguous result. It thus makes sense to avoid such ambiguity and ensure the query is sufficiently scoped to return only one match. The overall point is that whether using a string literal value (i.e. just stating a name) or using a code expression, the outcome must evaluate to provide Tinderbox with a reference to a single note.

A single note 'item' can be referenced as: