As Planarly uses a tree structure to organize sheets — a hierarchical model where sheets can contain child sheets, much like folders can contain folders on a file system — it provides a dedicated syntax to reference cells and regions in other sheets.

Absolute paths

Planarly's tree structure starts at Root. This is the highest or outermost level of the sheet hierarchy. In the example below you can see that the document contains two top level sheets, sheet1 and sheet2. sheet2 has two child sheets, child1 and child2. child2 is selected for editing.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/bfb9a649-50f7-4088-9a40-cb814e4b55ed/Screenshot_2021-07-09_at_11.03.50.png

To reference the cell labelled foo in the sheet child2, the absolute path would be:

Root.sheet2.child2.foo

If a sheet title contains spaces, simply enclose it in double quotes:

Root.taxes."income taxes".total

Relative paths

When building re-usable libraries of code within Planarly there is no way to know in advance where the sheets will be located. As a result, using absolute paths to reference other library functions isn't feasible, so Planarly provides a simple method for specifying relative paths.

These are based around the reserved symbols P, PP, PPP, etc. P is short for parent, i.e. the sheet containing the current sheet. Thus PP refers to the parent two levels up, PPP the parent three levels up, etc.

Referring to the image above, referring to foo in child2 from child1 would use the following relative path:

P.child2.foo

In the example below we show how values from another sheet can be accessed within a re-usable collection of code under a single parent sheet, here ufo tech.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7fd2653d-80da-4fd2-a1bf-243da6a0f34d/Screenshot_2021-07-09_at_14.09.31.png

Paths and the @ operator

If you use informative naming conventions accessing values from other sheets can result in long formulas and a lot of typing. Planarly has the @ operator to set the sheet context for interpreting variable names.

a+b @ P.a evaluates a+b in the context of sibling sheet a. The @ operator has the lowest precedence, so you can write almost anything on the left hand side without using ().