Alphabetize Containers

Can I alphabetize a container as I can an agent?

Yes, you are sorting the container (using $Sort, etc) and as an agent is a container so sorts just like a normal container does.

See the Sort Inspector for more detail.

1 Like

I’m missing something:

  1. I select the container I want to alphabetize (click title bar at the top of the container)
  2. I open inspector > action inspector > sort > sort by: Name > enter

  1. I then open the container, and nothing has changed, ie notes are where they were / have not been alphabetized.

Do I have to alphabetize a container note by note instead of by the container as a whole? I recently alphabetized an agent and it worked immediately so I’m confused why it’s not working here/what I am missing.

OK, ‘order’ is effected differently in map vs. outline. Sort affects $OutlineOrder, but in Map view this is not X/P position but Z-axis (front to back). This set of articles describes the difference.

It seems you want the visual map sort in Outline order, but how does that work in a map? So we make a map:

The outline order reflects the order of the notes’ creation:

We sort the container on $Name (in the manner you describe above) and our outline looks like so:

But, the map’s layout is unchanged (i.e. as in the picture above) even though the $OutlineOrder of the notes has changed. However, if I select all (Cmd+A) then View menu ▸ Cleanup… we get this, which I think is what you are after:

See more on (map) Cleanup arrangement. This same command can be called from the map background’s context menu (i.e. right-click menu when no note is selected).

The cleanup uses the map (container) current sort. If unsorted (as at the start above) a grid would simply read the map left to right, top-to-bottom. Here is a cleanup grid from note’s in a ad hoc layout. Note the grid order is not A–Z:

Does this help?

If I am understanding you, I need to first do a $Name sort in outline view; I can then, in map view, use View > Cleanup to get an alphabetized view. I will try this; please correct if I am wrong.

But I do not understand why $Name sort was successful previously in map view for an agent, ie why agent vs container makes the difference.

No, you are correct. Not obvious before the fact (unless you’ve read up on outline vs map arrangements), but that’s how to do it. you will have seen from the link to the Cleanup dialog that a grid isn’t the only pattern offered.

The next thing in this regard you may trip over is maps inside agents. Essentially, every agent update cycle they run a cleanup of the whole map. If that is not what you want, see $CleanupAction and Re-arrangeable Agent Maps.

HTH :slight_smile: