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 >> Basic agent query question on Tags
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1472982515

Message started by rickdude on Sep 4th, 2016, 5:48am

Title: Basic agent query question on Tags
Post by rickdude on Sep 4th, 2016, 5:48am

Hi everyone,

This is my first time working on Agents for a long time, and I'm a bit stuck.

I have several notes with the tag "slides" (one of several tags separated with semicolons; is this correct?).

I've created an Agent with the query:

Code:
$Tags.contains("slides")


It doesn't pick up any of the notes with the "slides" tag, though. So I'm guessing I have the syntax wrong, or that I've entered the tags wrongly.

Any advice?

Rick

P.S. In earlier versions of Tinderbox, I seem to remember that it wasn't necessary to memorize syntax for agents, because a dialogue enabled you to search for the things you were looking for by choosing from various options and the syntax was at least partially written for you. But I can't seem to find any dialogue like that in Tinderbox Six.

Title: Re: Basic agent query question on Tags
Post by Mark Anderson on Sep 4th, 2016, 10:54am

Testing (in v6.6.4 FWIW) you code works for me - I get a match to notes whose $Tags contain a value exactly, case-sensitively matching 'slides'. So a value of 'slides' is matched but not 'Slides' or 'slideshow'.  If the issue is one of case, use .icontains() instead.  Otherwise, based on the information supplied it's not clear why you're having the problem. Most likely, there may be other factors at play (e.g. other query terms providing unexpected filtering, etc.). Could you post a link to a TBX that exhibits the failure you describe?

$Tags - see here - is a Set-type system attribute. Sets support multiple values but do not allow duplicates (List-type do allow duplicates).


Also see here for querying List/Set type values.

As to your 'PS'. No, the configurator was dropped in v5 as it used now-deprecated syntax and action code (as used in queries) has grown so much that adding a syntax parser would be a big/expensive task (or so I understand).

Does that help?

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.