Skip to content
Varlig Guide
Varlig home

Sharing values between notes

Rates, prices and formulas you rely on usually belong in one place. Put them in a note, and any other note can pull them in with a single line, so a change to the source reaches every note that uses it.

Use another note’s values

Write use and a link to the note, on its own line inside a calc block:

calcAnswers depend on today’s date or live data
use [[Assumptions]] gives 2 values and 1 function from Assumptions

The answer says what arrived. From there on, every name the other note defines works as if you had typed it here:

calcAnswers depend on today’s date or live data
use [[Assumptions]] gives 2 values and 1 function from Assumptions
margin($80) gives $100.00
$100 * rate gives $108.00

with an Assumptions note holding:

calc
rate = 1.08 gives 1.08
markup = 25% gives 25%
margin(cost) = cost + markup gives

Imported names are available throughout the note that uses them, not only below the use line. A name the note defines itself wins from the line where it is defined.

Take only the names you need

List names before from to take only those:

calcAnswers depend on today’s date or live data
use margin, rate from [[Assumptions]] gives margin, rate from Assumptions, with markup that it reads

The source’s other names, such as a total it happens to define, then can’t stand in for one of this note’s own. Separate the names with commas; a name may contain spaces (use monthly rent, fee from [[Budget]]). A function brings the values it reads, so it answers as it does in its own note, and the line says which.

A name the source doesn’t define, after a typo or once it’s renamed there, is an error, and nothing is imported:

calcAnswers depend on today’s date or live data
use margn from [[Assumptions]] gives Error: No value or function named “margn” in Assumptions

Writing the line

  • use may be capitalised (Use [[Rates 2026]]), and a // or # comment may follow it.
  • Nothing else may share the line: use [[Assumptions]] * 2 is not an import.
  • The line has to be inside a calc block. In prose it stays text.
  • A source note may use a third note, up to eight notes deep.

When a source isn’t available

An import never leaves an old number in place. If the source can’t be read, the line says so and the names stay undefined:

The source is The line says
Missing Error: No note named “Assumptions”
Password-protected Error: “Assumptions” is protected — unlock it to use its values
In the Trash Error: “Assumptions” is in the Trash — restore it to use its values
Using this note in turn Error: Circular use: A → B → A

Renaming and keeping up to date

Rename the source note and Varlig rewrites the use lines that point to it. An open note recalculates when a note it uses changes, and every note re-reads its sources when you open it.

Each source is evaluated with its own settings: its calculation locale, its answer formats and its pinned exchange rates. A note written for one region keeps its meaning when another note uses it.

The explanation popover shows where an imported name came from, such as rate = 1.08 (from Assumptions), so you can always tell a local value from a shared one.

To see what depends on a value before you change it, look in the source. How Was This Read? on a line that defines a value or function lists Used by 2 Notes, naming each note that uses it, as in Invoice (uses every value). The source note’s Backlinks start with Used in calculations by 2 notes, with what each one takes. use lines don’t count as ordinary backlinks.