2022.1

Table Of Contents
Note
In OLConnect (as opposed to the original Handlebars library), numbers in Handlebars
expressions do not need to be surrounded by quotes. For example, to calculate 1+2 you
can write (add 1 2) instead of (add "1" "2").
Accessing data at different levels
A field or key name without a . or / is assumed to refer to a field or table at the root of the data
with which the template is rendered. There are a number of ways to access data that is not
located at the root.
l With . or / you can navigate down into the record or object. For example: {{Cars.Brand}}
and {{Cars/Brand}} refer to the same field.
Note that to access an item in a detail table or array directly, you also have to navigate
down. For example: Cars.Brand.Models.[0] refers to the first item in Models.
l @root represents the top level of the data.
If a template is rendered with the current record or part of it, @root refers to the root of the
current record.
With a JavaScript object, @root refers to the root level of the data that was passed to the
Handlebars template.
l The built-in helpers #each and #with dive into an object-property, giving you direct access
to its properties. (See "Using logic in a Handlebars template: helpers" on page982 and
the documentation of Handlebars.)
l Use ../ to navigate one level up. This is particularly useful in #each and #with blocks.
Note
If a template is rendered with part of the current record, the template still has access
to the entire record and can navigate up and outside of that part, to a higher level in
the current record.
If a JavaScript object is passed, the template only has access to the passed data,
and it does not have access to the current record.
Page 980