Every function, method and file field that BaseStudio formulas support, with examples.
This list comes from BaseStudio’s formula engine, so it shows exactly the functions that BaseStudio supports. BaseStudio uses Obsidian’s formula syntax; this reference defines its supported functions. To learn how to write a formula, see Formulas.
A function that is not on this list shows an error in the cell. For example, upper() is not supported, because
the engine does not define that global function. Use the supported text methods instead.
Global functions
Section titled “Global functions”Call a global function by its name: today(), max(a, b).
| Function | Description |
|---|---|
date(text) | Reads text such as 2026-03-15 or 2026-03-15T10:30 as a date. Example: date("2026-03-15") |
now() | The current date and time. Example: now() |
today() | Today's date, with no time. Example: due < today() |
number(value) | Makes a number from numeric text, a checkbox (1 or 0) or a date (milliseconds). Example: number("42") |
list(value) | Makes a list from one value. A list stays as it is. Example: list(tags) |
link(path, label?) | Makes a link to a note, with an optional label. Example: link("Projects/Launch", "Launch") |
duration(text) | Reads text such as 2h, 1 week, -3 days or P1DT2H as a duration. Example: today() + duration("1 week") |
file(path) | The file that a path or a link points to, or null when there is no such file. Example: file(owner).name |
image(path) | Shows the image at a vault path or a web address in the cell. Example: image(cover) |
icon(name) | Shows a Lucide icon by its name. Example: icon("star") |
html(text) | Shows text as HTML in the cell. Example: html("<b>New</b>") |
escapeHTML(text) | Replaces the characters & < > " ' with HTML entities, so that text shows as written. Example: html(escapeHTML(title)) |
max(number, …) | The largest number. Empty values are ignored. Example: max(a, b, c) |
min(number, …) | The smallest number. Empty values are ignored. Example: min(a, b, c) |
if(test, yes, no) is also available. See Formulas.
Methods
Section titled “Methods”Call a method on a value with a dot: title.lower(), tags.contains("urgent"). The Works on column tells you which
values have the method.
| Method | Works on | Description |
|---|---|---|
isEmpty() | any value | True for null, empty text, an empty list or an empty object. Example: notes.isEmpty() |
isTruthy() | any value | True when the value counts as true in a condition. Example: done.isTruthy() |
isType(name) | any value | True when the value has this type: string, number, boolean, list, object, date, duration, link, file or regexp. Example: owner.isType("link") |
toString() | any value | The value as text. Example: price.toString() |
contains(value) | text, list | True when the text contains the text, or the list contains the item. Example: tags.contains("urgent") |
containsAny(value, …) | text, list | True when it contains at least one of the values. Example: tags.containsAny("home", "work") |
containsAll(value, …) | text, list | True when it contains every one of the values. Example: tags.containsAll("home", "urgent") |
lower() | text | The text in lower case. Example: status.lower() |
title() | text | The text with a capital letter at the start of each word. Example: name.title() |
trim() | text | The text without spaces at the start and the end. |
startsWith(text) | text | True when the text starts with this text. Example: code.startsWith("INV-") |
endsWith(text) | text | True when the text ends with this text. Example: file.name.endsWith("draft") |
replace(pattern, replacement) | text | Replaces every match of a text. With a regular expression, the g flag replaces all matches. Example: phone.replace(/\s/g, "") |
split(separator, limit?) | text | Divides the text into a list at each separator, which can be a regular expression. Example: authors.split(", ") |
repeat(count) | text | The text repeated count times (0 to 10,000). Example: "★".repeat(rating) |
reverse() | text, list | The characters or the items in the opposite order. Example: steps.reverse() |
slice(start, end?) | text, list | The part from start up to, but not including, end. A negative number counts from the end. Example: title.slice(0, 20) |
abs() | number | The number without its sign. Example: (budget - spent).abs() |
floor() | number | The number rounded down to a whole number. |
ceil() | number | The number rounded up to a whole number. |
round(digits?) | number | The number rounded to this many decimal places (0 to 15, default 0). Example: (price * 1.2).round(2) |
toFixed(digits) | number | The number as text with exactly this many decimal places (0 to 100). Example: price.toFixed(2) |
join(separator) | list | The items as one text, with the separator between them. Example: tags.join(", ") |
unique() | list | The list without repeated items. Example: tags.unique() |
sort() | list | The items in ascending order. Example: scores.sort() |
flat() | list | Puts the items of lists inside the list into the list itself, one level deep. |
filter(condition) | list | The items for which the condition is true. Use value and index in the condition. Example: scores.filter(value > 50) |
map(expression) | list | A list of the expression's result for each item. Use value and index in the expression. Example: prices.map(value * 1.2) |
reduce(expression, initial) | list | Combines the items into one value. acc holds the result so far, value the item. Example: prices.reduce(acc + value, 0) |
keys() | object | The names of the object's fields, as a list. |
values() | object | The values of the object's fields, as a list. |
date() | date | The date without its time. Example: file.mtime.date() |
time() | date | The time as text, in the form HH:mm:ss. Example: start.time() |
relative() | date | The date as text relative to now, such as 3 days ago. Example: file.mtime.relative() |
asFile() | link | The file that the link points to, or null. Example: owner.asFile().folder |
linksTo(file) | link | True when the link points to this file. Example: project.linksTo(this.file) |
matches(text) | regular expression | True when the regular expression matches the text. Example: /^\d{4}$/.matches(code) |
format(pattern) | date | The date as text in a Moment.js pattern. Tokens: YYYY YY MMMM MMM MM M DD D dddd ddd HH H hh h mm m ss s A a. Text in [brackets] stays as written. Example: due.format("ddd D MMM YYYY") |
Text that is one wiki link, such as "[[Launch]]", also has the methods of a link.
Fields
Section titled “Fields”- Text and lists:
.length, the number of characters or items. - Dates:
.year,.month,.day,.hour,.minute,.second,.millisecond. - Durations:
.years,.months,.weeks,.days,.hours,.minutes,.seconds,.milliseconds.
File methods
Section titled “File methods”Call these on file, the record’s file.
| Method | Description |
|---|---|
file.hasTag(tag, …) | True when the note has one of the tags. A tag also matches its nested tags: project matches project/beta. Example: file.hasTag("project") |
file.hasLink(note) | True when the note links to this note, link or file. Example: file.hasLink("Team/Priya") |
file.hasProperty(name) | True when the note's properties include this name, even with an empty value. Example: file.hasProperty("due") |
file.inFolder(folder) | True when the note is in this folder or in a folder inside it. Write the path from the top of the vault. Example: file.inFolder("Projects/2026") |
file.asLink(label?) | A link to the note, with an optional label. Example: file.asLink() |
File fields
Section titled “File fields”Read these on file: file.name, file.mtime.
| Field | Value |
|---|---|
file.name | The file name. A Markdown note's name has no .md extension; other files keep their extension. |
file.basename | The file name without its extension. |
file.fullname | The file name. A Markdown note's name has no .md extension; other files keep their extension. |
file.ext | The extension, such as md. |
file.folder | The path of the folder that holds the file. |
file.path | The path of the file from the top of the vault. |
file.size | The size of the file in bytes. |
file.mtime | The date and time of the last change. |
file.ctime | The date and time the file was made. |
file.tags | The tags of the note: those in its text, then those in its properties. |
file.links | The links in the note. |
file.embeds | The embeds in the note. |
file.backlinks | The links to the note from other notes. |
file.properties | The note's properties, as an object. |
file.file | The file itself, for functions that need a file, such as linksTo(). |
Limits
Section titled “Limits”- A formula can be up to 16 KB long, with up to 2,048 parts and 64 levels of brackets.
- A regular expression can be up to 500 characters long.
- A formula can use up to 10,000 calculation steps for each record.