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


(James Fallows) #1

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.


(Mark Anderson) #2

Query:

$CityName.count >1

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

$CityName.size >1


(James Fallows) #3

Perfecto! Appreciate it, and many thanks.