How could I fetch the value of a meta-field in a linked note?

How could I fetch the value of a meta-field in a linked note ?
example:
note1:
ref:: 2023-11
see this parent note’s ref : [[note2]]
note2:
ref:: 2023-22

  • in note1 there is a link to note2
  • each note has a meta field (in yaml zone or in inline): “ref”
    I want to replace line
    see this parent note’s ref : [[note2]]
    by
    see this parent ref: 2023-22

where I fetch note2’s ref field… through a query ?

Using dataview inline js query, which needs to be enabled by itself, is one way to it then you would write something like: $= dv.page("note2").ref

To enable these kind of queries, go to Settings > Dataview > Enable Inline JavaScript Queries, and toggle it if it’s off. And note that in my example above, I’m using the default prefix for these queries, which can be defined a little lower on the same settings page, see “JavaScript Inline Query Prefix”.

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