Bases Formulas - Get the note property that is referenced in the note property in the base

What I’m trying to do

The base contains a lot of notes. One of the properties of these notes contains link to other note. Is it possible to adjust the formula so that it contains the property of the note that I see in the database.

Things I have tried

In the example, the first column is the name of the note, the second is a link to another note? in the third column, I wrote what I want to see in it, and in the fourth column, what I actually see if I set up the formula like this - link.aliases.

name Link link.aliases formula
note1 note4 note4.aliase4 Error: Cannot find aliases on type Link
note2 note5 note5.aliase5 Error: Cannot find aliases on type Link
note3 note6 note6.aliase6 Error: Cannot find aliases on type Link

You should be able to convert the link as a file using either asFile() or file() which will allow you to then access the properties under the note link points to and finally, the value(s) in the desired key :blush:

For example, you could use a formula such as:

link.asFile().properties.aliases

… to get all the values stored in the aliases key in the note link references.

This could require some tweaking though, depending on the actual setup of your base, the data type of link, your wishes/needs, etc… :innocent:

It worked! Thank you very much! In my case, the link was in :star:, and the value I wanted to get was in :glowing_star:. Here is the formula that I got -

link(:star:.toString()).asFile().properties.:glowing_star:

My pleasure :blush: !
Glad to know you were able to make it all work as expected :grin: :raising_hands: !

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.