Archiving items into another section

Apologies if this has been answered elsewhere but is there a script that would move all done or selected line items into an archive section in the same document?

I work through my lists daily but do not always want to delete the entries, this would be surely useful and I guess something like this already exists?

Of course I can drag it each time instead but this is quite cumbersome.

Many thanks.

@markb

Let’s say you have a row named ARCHIVE.

Then a simple script like this can move all checked rows to that ARCHIVE “section”:

tell application id "OOut"
	tell front document
		set archivSect to row named "ARCHIVE"
		set refDone to rows where ¬
			state is checked and ¬
			parent is not archivSect and ¬
			name is not archivSect's name
		move refDone to archivSect's children's end
	end tell
end tell

Or a script like this will move all current selected rows to the ARCHIVE section:

tell application id "OOut"
	tell front document
		set archivSect to row named "ARCHIVE"
		set refDone to rows where ¬
			selected is true and ¬
			parent is not archivSect and ¬
			name is not archivSect's name
		move refDone to archivSect's children's end
	end tell
end tell

Or, simpler, this (assuming you won’t select by mistake something already in ARCHIVE):

tell application "OmniOutliner"
	tell front document to move selected rows to row "ARCHIVE"'s children's end
end tell

SG

1 Like

Great, thank you, that is just what I needed!

Now if only columns supported simple calculations (±*/) , I have been asking for some time and it could be so useful instead of running Numbers or Excel … or of course an AppleScript.