I would like to test in a smart rule condition if a header item Zettel-ID in a markdown document is equal (or better: not equal) to a custom metadata field.
My use case/setup:
I have a template for wikilinks to fill certain information from the source document to the target document via placeholders. I control my Zettelkasten via a custom metadata ID.
Title: %@
Zettel-ID: %mdid%+
Keywords:
Created: %SortableDate%-%hour%-%minute%-%second%
**Idee**
**Zitat**
***
**Quellen/Literatur**
**Weiterführende Fragen**
---
**Parent**
← [[%recordName%]]
**Folgezettel**
→
**Querverweise**
→
The ‘+’ in the Zettel-ID header is an indicator for me that the note is a ‘Folgezettel’ (following note) and I need to change it to a or 01 depending on the ID structure.
Then a smart rule focussing on my Zettelkasten group tests if a file has an empty ID custom metadata field, runs a regex Zettel-ID: (.+) on the header of the file (thanks for providing the hidden setting to set IndexRawMarkdownSource to true) and places the Zettel-ID of the header in the custom metadata field ID.
My issue
However, sometimes I am quite slow changing the +in the newly created Zettel-ID-header line. That means that my smart rule changes IDto Source-ID+ instead of the wanted ID.
What I would like to do
I would like to know if it is possible to set up a smart rule that – as a condition – scans text against the custom metadata: if Zettel-ID: (.+) !== %mdid% then %mdid = \1 or something like that.
EDIT: cleaned up the Zettel-template above
EDIT2: found an error in my request (equal/not equal). I am actually searching for a way to test against A !== B
EDIT3: In my initial request I used ≠ instead of !== to describe ‘not equal’. Changed that to the common nomenclature.
