Add a line of command to exclude the current note in the result #921
-
I use the following code to list notes with the same tag:
Now I want to add a line of command to exclude the current note in the result, can anyone please give me some pointers? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @tyf2018 Append a where(p => p.file.name != dv.current().file.name) to your map. Also - is a semicolon needed after the header? Like so:
|
Beta Was this translation helpful? Give feedback.
-
Hi, @Servinjesus1 |
Beta Was this translation helpful? Give feedback.
-
Hi @tyf2018 I might have put it in the wrong place, Try now:
However, it's odd that the error raised is that
Otherwise, I'm struggling to see the issue... |
Beta Was this translation helpful? Give feedback.
Hi @tyf2018
I might have put it in the wrong place,
p
should be fed pages, not your nicely formatted names - apologies.Try now:
However, it's odd that the error raised is that
where is not a function
. If the above still isn't working, can you confirm that this snippet below produces a list of the current Note's metadata? If you get the same error, try updating Dataview or ensuring it's not coming f…