I guess that would be a challenge if you need multiple badges per note.
Although it could be done by creating a badge for each desired combination, using a custom attribute of type Set, and then creating an Agent or Stamp to assign the custom badges based on the contents of the custom attribute.
It could be done but maybe not worth the effort. But a benefit would be that it is then visible in the outline view in addition to the map view.
Just to tie the strands together, the technique in @satikusala’s demo is indeed the method I’d documented in the previous link.
In the demo, the list items are concatenated with a pipe | characters:
$Flags.format("l").icontains("@@")
(BTW, in the demo, the agent omits the ‘$’ prefix. The agent works, but only due to legacy format support.)
Clearly, were that concatenator to be one of the characters used on your flags, then you’d use a different concatenator. So, you might change a pipe to a hash:
I appreciate all the positive feedback I’m getting for producing the videos; I accept the accolades and am grateful.
However, I, in no way, have done this alone and stand on the shoulders of the giants that have come before me and support me now.
@beck’s wonderful video inspired me. @eastgate’s patience with me has been laudable. @bmgphd got the ball rolling and his pushback inspired me to be better. We’d be nowhere without @Sylvaticus weekly meetup. @TomD’s detailed critiques have been exceptionally useful. And, then there s everyone’s comments on the videos; @pmaheshwari in particular inspired me to figure out how to improve the video and audio quality (a whole new skill set). @PaulWalters’s feedback, as well has been instrumental. @rtalexander got me into understanding runCommand and functional with regex.
And, then there is Mark A. aTbRef is a gift to the community. For me personally, Mark has spent tens of hours with me in one-on-one calls over the last few months as we grock Tinderbox and knowledge management.
To those not mentioned, gratitude goes out to you as well.
And without your reference I’d be utterly lost in all I attempt to do in TB (truly).
I had a hard time with the section you pointed out… perhaps due to the verby nature of “format,” it’s association with “replace” and the caution to proceed with care. I was concerned I was reformatting my data. The explanation also assumes some base knowledge on regex that I don’t have, as well (I don’t know which symbols have regex meaning and I don’t). The turning point for me was the statement Michael made in the video where he said the code was temporarily creating a string on the fly that could be searched.
Great. That’s useful info I can action. Especially the part about not changing the source.
The problem with regex is you can’t simplify them. They do what they do, but there are online and Mac app resources for testing regex which helps with both learning and confidence (the online resources are largely free).
Reflecting the above, I’ve updated my notes replacements for strings and lists to make more explicit that the replace action does not affect the source—unless you use the output of the action to overwrite the source.
Now $SomeString is set to the output but $Text is unchanged. But if we set input as the output:
$Text = $Text.replace("searchStr","replaceStr");
The $Text is now changed, and being an action there is no undo (other than old copies of the file). Of course, the above behaviours apply not just to $Text but to any string-like source.