Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Agent, Actions, Rules & Automation >> Query all notes on smart adornment
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1430778525

Message started by SteveS on May 4th, 2015, 6:28pm

Title: Query all notes on smart adornment
Post by SteveS on May 4th, 2015, 6:28pm

Greetings,

I would like to query a list of all notes associated with (gathered by) a smart adornment.

Any suggestions?

Kind Regards
Steve

Title: Re: Query all notes on smart adornment
Post by Mark Anderson on May 5th, 2015, 5:14am

By a particular adornment or every smart adornment in the document? Queries don't match adornments. Note on top of an adornment are inside() the adornment but their parent is their container, not the adornment. There is no reference for "the thing I am inside" as really you need to test that 'thing' for being an adornment ($IsAdornment).

Title: Re: Query all notes on smart adornment
Post by SteveS on May 14th, 2015, 10:02pm

Thanks Mark.

Query may have not been the proper term.  What I am looking to do is perform operations on
all notes that have been collected by a particular smart adornment.

I have not tinkered with 'find' up to now, but maybe there is a way to do what I am hoping with 'find'?

Kind Regards
Steve

Title: Re: Query all notes on smart adornment
Post by Mark Anderson on May 15th, 2015, 4:53am

Queries/finds. The find() operator is a way of using agent-like queries within operators that use item/group scoping inputs, especially as a way to describe a group that isn't derived from the outline hierarchy (e.g. all green $Color notes or notes with $CharacterAge over 30).

In v5 you can test $IsAdornment(adornment) which will only return true if a not is on top of an adornment (regardless of current main view type). Testing in v6.2.1 it appears the adornment designator is not evaluating correct. this will doubtless get fixed but can't be used at present.

(edit: typo)

Title: Re: Query all notes on smart adornment
Post by Mark Bernstein on May 15th, 2015, 8:59am

If you have a smart adornment named PARIS, the natural way to perform an action on all notes that overlap PARIS is the adornment’s OnAdd action.

Alternatively, another agent could use as its query

      inside(PARIS)

and perform an action on the notes it finds.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.