Tinderbox Forum

How to query for >1 values in a Set attribute?

I am sure there is an easy answer for this, but I am not sure what it is right now:

  • Have a file with a set-type Key Attribute, let’s call it $CityName
  • Usually I assign just one value to each note’s $CityName – let’s say Duluth, Albuquerque, Chengdu, etc.
  • I want to check for notes to which I have, either on purpose or inadvertently, given multiple $CityName assignments.

What is the query for an agent that will identify those notes? If I’m using an outline view, I can set a column for $CityName, and find them by eyeballing that way. Similarly with an attribute browser. But what is the syntax for a query to find items whose count of $CityName values is >1?

Thanks in advance.


$CityName.count >1

You can also use the older form (both do the same)

$CityName.size >1

Perfecto! Appreciate it, and many thanks.

1 Like