Back now, and testing more, the
$IsAlias query isn’t that reliable on it’s own as it can detect aliases in the agent itself. But, the following does work for me. Note that I’m using $Name with the assumption that all notes/agent $Name are unique.
In an agent I have the $AgentQuery:
$IsAlias & $Name(parent)!=$Name(agent)
This ensures we only detect aliases that aren’t in this agent. If you want to exclude aliases in all agents - i.e. filter only manually created aliases and ignore agents then use this query:
`IsAlias & $AgentQuery(parent)==""
Next the agent’s $Rule:
$Text = ($MySet2-$MySet).format("\n");
Firstly, $MySet collects a list of the $Name of all the aliases found. Second, $MySet2 collects a list of every note in the document except agents. Lastly, subtracting $MySet from $MySet2 gives us a list of $Name of notes with no aliases and which we then format as one value per line and set as the $Text of the agent.
I’ve only tested this (in v7.3.0) on a small doc with c.10 items. I’m not sure how/if this scales to your document. I’d suggest you make a copy of your document and then try out the above .note, $MySet2 is a Set-type User attribute. If you don’t use unique note $Name then substitute $Path for $Name everywhere you see it above.
Separately, I understand your use case but ultimately I think you’re heading up a blind alley. The DT watched group is intended to watch one (and only one) group and has a design intent that group be small to avoid excessive inter-app load. I presume ‘small’ is <10 items so you might as well track this by hand.
I should note that the last paragraph is written as at v7.3.0. the DT watched group feature will evolve and may support a richer feature set along the lines of your need, but not currently. Thus I’d use a different approach for now as you’e just making hard work for yourself. I’d go with the suggestion made in another thread of making a note per DT item of interest and setting them to auto-fetch. If you use a prototype for all these notes then you could turn $AutoFetch on/off for all the notes from the prototype.