How to use lists to collect information?

I am analyzing different roles of ECM system users. They are represented by notes with prototype “User”. I want to collect a list of users’ names. I don’t understand how to do this practically.

Where are the user’s names stored? Are they the titles ($Name) of these notes or in some other attribute.

Meanwhile, an agent or find() will locate all notes with the prototype “User” with this query:

$Prototype=="User"

Users’ names are stored in notes’ titles.
Please explain both ways: with agent and find()?
Thanks for help!

Well, let’s try something very simple, just to get started.

Create a new agent.

Query: $Prototype==“User”
Sort: Name

This will collect each note which has the User prototype, and then will sort the names alphabetically.

Agent query:

$Prototype=="User"

and the agent’s $Edict:

$Text=values(children,"Name").sort.format("\n"); 

Or to avoid using an agent, add a note and give it this $Edict:

$Text=values(find($Prototype=="User"),"Name").sort.unique.format("\n"); 

In each case the agent/note text will be an alphabetically-sorted list of discrete values (in this case note titles)

Using an Edict means it only runs once and then once an hour rather than again and again which is unlikely to be what you need.

Thank you for reply. The first method with agent works. The second for some reason leaves Text field of the note with Edict empty. I must be doing something wrong.

Ah, I’m not 100% sure if the scoped method of values() evaluates find() or only takes group designators like children. I’ve not had a chance to test.