| Quicklinks: Attributes | Action Codes | Export Codes | Designators | Date Formats | aTbRef Site Map | Here |
| A Tinderbox Reference File : Agent Queries : Querying for aliases - agents |
Querying for aliases - agents |
Although the parent of an alias is its (outline) parent, as the image shows, it is not always interpreted as such. In addition, queries like inside() and descendedFrom() find aliases in 'other' containers besides their original's because the original note lies within scope of the query. Note that use of the 'parent' designator can be used to filter queries rendering apparent false positives. The All children of an agent are aliases regardless of whether they point to an original or an alias. Changes in v5.0.2 and v5.1.0 to the way agents function will make queries like inside() and descendedFrom() function more accurately when looking for both original and/or existing aliases. At the same time, the addition of the $IsAlias attribute also helps. $IsAlias cannot be used on its own, can help find only original notes:
To find aliases as opposed to originals, it may be insufficient to use the reverse:
Why? Because an agent's children are also aliases, although not user-created ones. In order to filter out aliases within agents an extra query term is required:
As agents de-dupe listings, the above methods can't be used to locate multiple aliases of the same note. However, it is possible to locate their containers - as long as the latter are themselves not all named the same. Use:
Clause one discards any containers that are agents (because they will have a query value). The second clause matches any container where one or more children are aliases. To filter this for just aliases of a known note title, try:
There is no 'IsAgent' test but only agent will have a value for $AgentQuery so it works in this context. Whilst it is possible to make an agent and not give it a query, such an agent cannot have any children (no query to match against) and so wouldn't affect the above query. It may be easier to use find() for tracking down aliases. |
![]() |
Possible relevant notes (via "Similar Notes" feature):
| Up: Agent Queries | |||
| Previous: Self-referring agents | Next: Querying for aliases - find() | ||
| |
|||
|
|||
Quicklinks: Attributes | Action Codes | Export Codes | Designators | Date Formats | aTbRef Site Map
[Last updated: 16 May 2012, using v5.11.1]
Search:
aTbRef by Mark Anderson is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
[See aTbRef CC licence Attribution & Waiver info]