The issue is that Tinderbox doesn’t support aliases of aliases, so you can’t use an agent to find all aliases with a specific name.
Each cycle, an agent iterates through every note in the document (including aliases) and evaluates its $AgentQuery on that note. If the $AgentQuery evaluates to true, an alias to that note is created as a child of the agent. However, in Tinderbox when you create an alias of an alias, you actually get an alias of the original note. Agents won’t create more than one alias of a note, so you can’t use an agent to find all aliases of a particular note.
Say you have a note with $ID 1527555444 and you have five aliases of that note throughout your document. If you created an agent with the query
$IsAlias & $ID(original)==1527555444
It would only ever have a single child, even though there are five aliases to note 1527555444 (actually six after the agent runs and creates another alias).
So to get the names of all aliases of a particular note, you have to do something like create a stamp with this action:
id = $ID;
$Text=find($IsAlias & $ID(original)==id)
When you apply this stamp to a note, it sets the text of the note to the names of all the note’s aliases.
As a side note, I would expect this stamp action to yield the same results, but it sets $Text to the empty string:
$Text=find($IsAlias & $ID(original)==$ID(that))
Does anyone know why that doesn’t work?