Skip to content

Formula

A Formula property shows a value the app computes from the entry’s other properties.

Example: in Workouts, “Pace” is a Formula:

prop("Time") / prop("Distance")

For “Morning run” (Time 28:00, Distance 5.2 km) it shows 5:23 per km. Time and Distance are formulas too: they read the run’s Route (see Functions for JSON).

Rules

  • Computed, never stored. The app works the value out each time. You cannot type into it.
  • Points to properties by id. You write prop("Distance"). The app saves the property’s id (a fixed internal number), so renaming Distance to “Km” never breaks the formula.
  • Totals over children and relations. Example: the volume of a workout, sum(children("Sets"), "Weight").
  • Live. A formula that reads a JSON property updates while the property records.
  • A formula can read any property type, Block page included. How it reads a Dashboard is not decided yet.

What you can write

Part Example
A property prop("Distance")
Numbers and text 10000, "Great day"
Yes and no true, false
Arithmetic + - * / % (remainder)
Comparison == != < <= > >=
Logic and, or, not
Functions if(prop("Steps") > 10000, "Great day", "Keep going")

+ joins text when one side is text. Durations count in minutes when you compare or divide them. Every function is listed in Formula functions. The average is always average(). The older names avg() and mean() still work.

Functions for JSON

These functions work on any list in a JSON property: the points of a route, a heart-rate series, a list of steps. The optional second argument names the field to read in each item, for example "bpm".

Function Gives Example Result for “Morning run”
distance(points) the length of a list of points, in km distance(prop("Route")) 5.2
duration(list) the time from the first item to the last; paused time does not count duration(prop("Route")) 28:00
count(list) how many items count(prop("Route")) 1,680
sum(list, field?) the total sum(prop("Steps"), "steps") 6,240
average(list, field?) the average average(prop("Heart rate"), "bpm") 152
min(list, field?) the smallest min(prop("Heart rate"), "bpm") 98
max(list, field?) the largest max(prop("Heart rate"), "bpm") 176
first(list, field?) the first item, or its field first(prop("Route"), "time") 7:00
last(list, field?) the last item, or its field last(prop("Route"), "time") 7:28

A wrong GPS distance is fixed in the route, never in the formula. Remove the wrong points from the Route, and Distance, Time and Pace follow. See Record a GPS run.

What a formula returns

Result Example
Number 5.38
Text “Great day”
Yes or no true
Date and time 21 Nov 2026
Duration 1 h 45 min
Empty when a property it reads is empty

An error (for example, dividing by zero in pct()) shows as an error on that entry. It never shows an invented number.

Settings

Setting What it does
Name The name you see, for example “Pace”.
Formula The expression.

Display settings for the result (unit, decimals) are not decided yet.

How it shows

Place Shows
Card, row, table the result, read-only; views sort and filter by it
Entry page the result; the formula shows in the property’s settings

In the folder

The result is not stored in the database. Whether the entry’s file shows it is not decided yet. The formula itself is part of the collection’s settings in _collection.json.

AI

The AI reads the result like any value, under the collection’s AI setting.