Help with an agent to collect notes containing sets of tags

Yes if using a .contains regex. The point isn’t whether .contains works on a list but that we are generally encouraged to avoid these where possible.

Now, it may be quicker to regex-test $Tags for a value rather that iterate each (which is not currently possible in a query) list value for an equality test. If so, the above becomes moot. I’ve been asking as it has arisen in my own use and that of some users I’ve been helping and I’m trying to get clarity on this issue. HTH :slight_smile:

Actually, I checked the code and .contains tests list elements for string equality, not regex equality.


I’m looking into .every() and .any(). But much can be done with other list operators.

 max($Age)<9

All the kids are under nine

min($Age)>20

Every child is 21 or older.

Yes, I think I expressed myself poorly, as .contains() used on a list only matches complete values against literal strings. I’d agree this equates to to an equality match, although I’d assumed it occurred by a less efficient method. So, I guess that’s moot. Thanks!

The max/min methods are most useful, having just taken them for a spin.I’d not realised they could be used in a query. i’ll work that useful wrinkle in my aTbRef notes. Again - many thanks.