Sorry about the obtuseness. If I run the script, the saved searches in the document and the
Archive project are moved to the top. This is confusing since by default they are added at the end of the document. So that, I wanted to sort top level projects without including the “Archive” project the search queries.
I figured that since you had this on the code,
outline.evaluateItemPath( '/@type=project' )
I could just select the top level projects except the search functions and the Archive project. That was the reason of the code I included,
outline.evaluateItemPath( '/* except (archive union @search)' )
Now. Onto my second question. I have some projects organized like this,
But I wanted to be able to organize it alphabetically by last names. Something like,