# Bases Migration/Quick Start Guide

**URL:** <https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571>\
**Category:** Workflows & Templates\
**Created:** [June 5, 2025, 5:27pm UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571 "2025-06-05T17:27:26Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roam](https://forum.obsidian.md/user_avatar/forum.obsidian.md/roam/32/75949_2.png) [@Roam](https://forum.obsidian.md/u/Roam)\
**Post date:** [June 5, 2025, 5:27pm UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/1 "2025-06-05T17:27:26Z")

</div>

Base functions have been changed pretty heavily in [Obsidian 1.9.2](https://obsidian.md/changelog/2025-06-05-desktop-v1.9.2/). This should allow for more streamlined formulas, and should be a bit more intuitive, but there have been a lot of breaking changes as a result. I’ve put together a small guide to help ease the transition. This can also serve as a quick start guide for people new to Bases.

Here are some common formulas I’ve seen and how to implement them in with the new syntax:

## Filtering by tag

- `#tag` in the body of a note or a Property:
  - New:
    - `file.hasTag("cat")`
    - `file.hasTag("cat", "dog")`
    - `file.hasTag("cat", "dog","",...)`

  - Old: `taggedWith(file.file, "cat")`

- `tag` only in Properties
  - New: `tags.contains("cat")`
  - Old: `contains(tags, "cat")`

- `#tag` inline, not in properties

```auto
    filters:
      and:
        - file.hasTag("cat")
        - if(tags.contains("cat"), false, true)

```

 ![Filters through the UI](https://forum.obsidian.md/uploads/default/original/3X/0/7/07c7bd8b9f8d8e6a908bb9967666ed7d56e2b9d8.png)

## Links

- General:
  - `file.hasLink("path")`

- Notes that link to `this` note:
  - New `file.hasLink(this)`
  - Old: `linksTo(file.file, this.file.name)`

- Property contains a link to `this` note:
  - New:
    - If your property is of type list: `<property>.contains(this)`
    - If your property is of type text: `<property> == link(this)`

  - Old: `contains(<property>, concat("[[", this.file.name, "]]"))`
  - Replace `<property>` with the name of your property, i.e. `director.contains(this)` , `attendees.contains(this)`, etc.
    - If your property name has spaces or special characters, see note under Misc Notes
    - If you have properties where the value is not in a list element, and is instead on the same line as the property key, you may need to convert your property to a list first: `list(<property>).contains(this)`

## Folders

- Filtering by folder
  - New: `file.inFolder("MyFolder")`
  - Old: `contains(file.path, "MyFolder")`

- List all notes in the same folder as `this` note:
  - New: `file.inFolder(this.file.folder)`
  - Old: `contains(file.path, this.file.folder)`

## Created Today

- Using `ctime`
  - New: `file.ctime.date() == today()`
  - Old: `date(file.ctime) == date(now())`

- Using a custom property in “YYYY-MM-DD” format
  - New: `datecreated == today()` (`datecreated` being a date field)
  - Old: `datecreated == date(now())`

## Modified Today

- Using `mtime`
  - New: `file.mtime.date() == today()`
  - Old: `date(file.mtime) == date(now())`

- Using a custom property in “YYYY-MM-DD” format
  - New: `datemodified == today()`
  - Old: `datemodified == date(now())`

## Created in the past `n` days

- Using `ctime`, with n = 7
  - New: `file.ctime >= today() - "7d"`
  - Old: `date(file.ctime) >= date(dateModify(date(now), "-7d"))`

## Modified in the past `n` days

- Using `mtime`, with n = 7
  - New: `file.mtime >= today() - "7d"`
  - Old: `date(file.mtime) >= date(dateModify(date(now), "-7d"))`

## Query all in note with a specific property

- All notes with a specific property which contains a value
  - `myProperty` or
  - `note.myProperty`

- All notes that contain a property, but it doesn’t have a value:

```auto
    filters:
      and:
        - note.keys().contains("myProperty")
        - !myProperty || myProperty == null

```

 ![Filters through the UI](https://forum.obsidian.md/uploads/default/original/3X/f/4/f467e65f8205b1b324c9489a3d3e192db5edca72.png)

## Misc Notes

- The `not()` function has been removed, we can simply use `!` instead
  - New: `!director.contains(link("Hayao Miyazaki"))`
  - Old: `not(contains(director, "[[Hayao Miyazaki]]"))`

- If your property contains spaces or characters such as dashes, you’ll need to encode the property name like so:
  - For `My Property`
    - `note["My Property"]`

  - For `My-Property`
    - `note["My-Property"]`

  - If you’re filling out a filter and select the property through the UI, this will be handled for you

## New

There’s also some new functions that have been added. Here are some examples of how you can implement them.

### link()

This lets you set the display text for a link, similar to link aliases. This lets us use the value of a property as a link: `link(file, property)`

Example:  
I have notes on albums, the note names are in this format: “GOLLIWOG-by-billy-woods-2025”

I have the following properties:

```auto
title: GOLLIWOG
artists:
  - "[[billy woods]]"
year: 2025

```

I can create a Formula column with my formula set to `link(file, title)`, and I’ll get a column that lists this note as “GOLLIWOG” instead of the full note title. I can hide my `name` column, and utilize this one instead to clean up my results.

Before:

 ![Base view using note name as link](https://forum.obsidian.md/uploads/default/original/3X/8/8/88b221e55013b67deeb3cdd134c049317f202f69.png)

After:

 ![Base view using asLink](https://forum.obsidian.md/uploads/default/original/3X/f/c/fc5fcae9e07964ce2e3407db69970a5565c3902e.png)

A more advanced use case for this function would be using it to create a link to a daily note using the note name:

- Suppose I have a note: “2025-06-05 My Note”
- I can add this formula in a column:
  - `link(date(file.name.split(' ')[0]).format("YYYY-MM-DD"))`
    - The exact implementation that will work for your vault will be dependent on your note name structure

- That column will now have a link to the corresponding daily note for that date

 ![Pasted image 20250605132430](https://forum.obsidian.md/uploads/default/original/3X/a/e/ae5554c1fc1b05432ba9de53dfc1b9ce254159f7.png)

This gives us a lot of flexibility with creating link to notes within our base results. We can take this particular example a step further by using the display text parameter:

- `link(date(file.name.split(' ')[0]).format("YYYY-MM-DD"), date(file.name.split(' ')[0]).format("dddd, MMM YYYY"))`

Using this, you can change the date format that is displayed for the daily note link.

 ![Pasted image 20250605133314](https://forum.obsidian.md/uploads/default/original/3X/5/5/553bf1df25020cb8bbc7c19477c8e33b0a6b8613.png)

---

<div class="post-metadata">

**Author:** ![Kaleo](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/k/c2a13f/32.png) [@Kaleo](https://forum.obsidian.md/u/Kaleo)\
**Post date:** [June 5, 2025, 7:00pm UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/2 "2025-06-05T19:00:56Z")

</div>

All my bases are broken. It seems `!project.contains(link("MyProject"))` does what you expect`project.contains(link("MyProject"))` should do..

In other words, “does not contain” executes as “contains”.

---

<div class="post-metadata">

**Author:** ![Pch](https://forum.obsidian.md/user_avatar/forum.obsidian.md/pch/32/8496_2.png) [@Pch](https://forum.obsidian.md/u/Pch)\
**Post date:** [June 5, 2025, 7:14pm UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/3 "2025-06-05T19:14:11Z")

</div>

In the filter did you accidentally select `None of the following are true` as a “type” of filter, by any chance ? 🤔

---

<div class="post-metadata">

**Author:** ![Kaleo](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/k/c2a13f/32.png) [@Kaleo](https://forum.obsidian.md/u/Kaleo)\
**Post date:** [June 5, 2025, 7:37pm UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/4 "2025-06-05T19:37:06Z")

</div>

Nope, it’s literally inversed. When I put ! (does not contain) it actually shows anything that DOES contain the given project.

---

<div class="post-metadata">

**Author:** ![Roam](https://forum.obsidian.md/user_avatar/forum.obsidian.md/roam/32/75949_2.png) [@Roam](https://forum.obsidian.md/u/Roam)\
**Post date:** [June 5, 2025, 8:12pm UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/5 "2025-06-05T20:12:31Z")

</div>

What happens if you do `!list(project.contains(link("MyProject"))` ?

---

<div class="post-metadata">

**Author:** ![Kaleo](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/k/c2a13f/32.png) [@Kaleo](https://forum.obsidian.md/u/Kaleo)\
**Post date:** [June 5, 2025, 8:17pm UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/6 "2025-06-05T20:17:21Z")

</div>

This works. Without the `!` this time though. Is this supposed to be the way?

One thing I liked about the previous version of Bases is that I can just click buttons instead of writing queries to do “simple” things (like dataview).

---

<div class="post-metadata">

**Author:** ![Roam](https://forum.obsidian.md/user_avatar/forum.obsidian.md/roam/32/75949_2.png) [@Roam](https://forum.obsidian.md/u/Roam)\
**Post date:** [June 5, 2025, 8:22pm UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/7 "2025-06-05T20:22:45Z")

</div>

If adding `list()` worked then your properties may have some inconsistencies. If it’s of type list, some of your notes might have

`project: "MyProject"` instead of

```auto
project:
    - "MyProject"

```

For the most part, doing this through the UI if your properties are well formatted would be as easy as selecting `project contains` and typing `[[My Project]]` into the value parameter. That’s all I can think might be causing you trouble.

---

<div class="post-metadata">

**Author:** ![Kaleo](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/k/c2a13f/32.png) [@Kaleo](https://forum.obsidian.md/u/Kaleo)\
**Post date:** [June 5, 2025, 8:29pm UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/8 "2025-06-05T20:29:07Z")

</div>

All my “project” properties are of the _text_ type:

```auto
project: "[[MyProject]]"

```

My initial “button click” query works fine, but the “contains” logic is just inversed.

---

<div class="post-metadata">

**Author:** ![Roam](https://forum.obsidian.md/user_avatar/forum.obsidian.md/roam/32/75949_2.png) [@Roam](https://forum.obsidian.md/u/Roam)\
**Post date:** [June 5, 2025, 8:41pm UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/9 "2025-06-05T20:41:17Z")

</div>

In that case, you can do `property is [[MyProject]]`

Which becomes `project == link("MyProject")`

---

<div class="post-metadata">

**Author:** ![Kaleo](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/k/c2a13f/32.png) [@Kaleo](https://forum.obsidian.md/u/Kaleo)\
**Post date:** [June 5, 2025, 9:49pm UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/10 "2025-06-05T21:49:28Z")

</div>

> [@Roam](#):
>
> Which becomes `project == link("MyProject")`

Same problem as other queries, to get the desired result (==) I need to use !=, so, to be clear:

`project != link("MyProject")` shows all files where `project IS MyProject`.

EDIT: The problem is:

My property value is actually an alias, which is pre-loaded in the selector.

So the query `project == link("myVeryLongProject|ProjectA")` (where the value is just selected from all populated options for the project property) does not work but `project == link("myVeryLongProject")` works. The actual content in source view is `project: [[myVeryLongProject|ProjectA]]` so it’s weird that this does not work as expected.

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [June 5, 2025, 10:09pm UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/13 "2025-06-05T22:09:10Z")

</div>

Pinned on June 5, 2025, 10:09pm UTC



---

<div class="post-metadata">

**Author:** ![natcl](https://forum.obsidian.md/user_avatar/forum.obsidian.md/natcl/32/81085_2.png) [@natcl](https://forum.obsidian.md/u/natcl)\
**Post date:** [June 6, 2025, 12:32am UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/14 "2025-06-06T00:32:09Z")

</div>

> [@Roam](#):
>
> - New: `<property>.contains(this)`
> - Old: `contains(<property>, concat("[[", this.file.name, "]]"))`

I was not able to make that work. My property is called “Espèce” so since there’s a special character I also tried note[“Espèce”].contains(this) but that did not work either.

This worked however:  
Espèce == link(this)

---

<div class="post-metadata">

**Author:** ![Iv3llios](https://forum.obsidian.md/user_avatar/forum.obsidian.md/iv3llios/32/36204_2.png) [@Iv3llios](https://forum.obsidian.md/u/Iv3llios)\
**Post date:** [June 6, 2025, 8:50am UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/15 "2025-06-06T08:50:56Z")

</div>

> [@Roam](#):
>
> contains(, concat(“[[”, this.file.name, “]]”))

I also use this expression, haven’t figured out the equivalent in the new syntax yet..

---

<div class="post-metadata">

**Author:** ![Roam](https://forum.obsidian.md/user_avatar/forum.obsidian.md/roam/32/75949_2.png) [@Roam](https://forum.obsidian.md/u/Roam)\
**Post date:** [June 6, 2025, 1:19pm UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/16 "2025-06-06T13:19:50Z")

</div>

> [@Roam](#):
>
> Property contains a link to `this` note:
> 
> - New:
> - If your property is of type list: `<property>.contains(this)`
> - If your property is of type text: `<property> == link(this)`

It’s listed just above

---

<div class="post-metadata">

**Author:** ![mjkerrison](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/cc9497/32.png) [@mjkerrison](https://forum.obsidian.md/u/mjkerrison)\
**Post date:** [June 8, 2025, 3:36am UTC](https://forum.obsidian.md/t/bases-migration-quick-start-guide/101571/17 "2025-06-08T03:36:08Z")

</div>

Undocumented(?) change in behaviour: queries with “[does / does not] contain” now seem not to return anything when the property isn’t present (i.e. is empty) on a note. So (A) no longer works for me, while (B) does. (NB that I’ve updated the ‘projects.contains’ syntax already - not suggesting _that_ worked for me before.)

(A)

 ![image](https://forum.obsidian.md/uploads/default/original/3X/b/3/b3e7fd1d792d39697965cbadca0b13e3ef989742.png)

(B)

 ![image](https://forum.obsidian.md/uploads/default/original/3X/3/e/3ef56ad23ce03c42bbafc077e1df9c252f424001.png)
