Welcome, Guest. Please Login
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
Pages: 1
Send Topic Print
Agent Query help (Read 6593 times)
Derek Van Ittersum
Full Member

Posts: 168

Agent Query help
Jun 3rd, 2009, 11:05am

I'm new to Tinderbox, but loving it so far.  As I try to sophisticate a bit, I'm running into some trouble with more complicated agents.

I'm currently planning a syllabus, and am past the stage of dumping citations into map view and moving them about on adornments.  Each citation has a prototype (Definitely, Maybe, No, Probably Not) and some have an attribute corresponding to the unit they apply to (1, 2, etc.).  I have created 8 agents corresponding to the eight units, and they just look for a note with the right attribute.

what I'd like to do now is create an agent to mop up the leftovers.  I'd like it to find every note that doesn't have a unit number assigned, but only those notes linked to the Definitely and Maybe prototypes (obviously the "probably not" and "no" notes won't have unit numbers).

Here's my attempt:  

unit=" "&Prototype="Definitely"|Prototype="Maybe"

What I think this says is "find all notes where the unit attribute is blank, and the prototype is either definitely or maybe.  However, this isn't what the agent is returning, so clearly I'm messed up on the "OR" syntax.  Could someone point me in the right direction?  Thanks!
Back to top
« Last Edit: Jun 03rd, 2009, 11:06am by Derek Van Ittersum »  
  IP Logged
Mark Bernstein
YaBB Administrator

designer of

Posts: 2871
Eastgate Systems, Inc.
Re: Agent Query help
Reply #1 - Jun 3rd, 2009, 11:58am
I think your query would be clearer if you used partenthesis to group sub-expressions:


Also, notice that unit=" " is not the same thing as unit="" --that extra space character might be a problem.  But I expect that your query is looking for

    (unit=""&Prototype="Definitely") | Prototype="Maybe"

which is probably not what you intended.

Hint: when queries aren't doing what you expect, try building them up from simpler queries such as




By testing simple sub-expressions, you can more quickly see where things are going wrong.

Back to top
WWW   IP Logged
Pages: 1
Send Topic Print