Unordered Smart Group

Hello,
It seems from this thread [1] there were reasons for not supporting unordered smart groups.

Since the option is still greyed out I assume that is still the case.

I have a long unordered list of documents, each one represents a comic book page, and I wish to filter them by various means such as tags.

I also need the filtered list to follow exactly the order of the initial group.

Is there a way for me to achieve some equivalent result?

If that helps, in Scrivener, I would use a collection and sort it by “Binder’s order”.

The only thing I can think of right now is to prefix my initial documents’ names with a number - which would mean renumbering them when needed.

(edited) also trying with adding a metadata string and sorting by that.

Any easier way I am missing?

Regards,
Philippe

[1]

That is correct. Unsorted is still not an option for smart group results.

Thank you.

You’re welcome.
What are you specifically trying to do, especially as it seems the order is dynamic?

The documents I filter are graphic novel pages: one page per document.

I tag those documents to filter Arcs, Plot Points, Themes, Locations, Pace, …

Example 1: If I want to see all pages when Actor A has a character development moment, I will search for his name as well as the tag “Arc_A”.

Getting the result ordered the same way as the script pages is key as I want to see the evolutions of my actor in a story order

Example 2: If I want to see all pages where Actor A is involved in Sub Plot X, I will search for his name as well as the tag “Plot_Subplot_X”.

Here, same thing, the filtered results only makes sense (to me) in story order.

Example 3: I need to see if my pages are paced as they should

  • do I have too many “slow” pages in a row where I am sure to bore the reader
  • do I have a good change of pace to allow the reader to relax after a hard battle scene.
  • …

Etc.

I already have one hundred pages and expect to have a few hundred more: Those smart groups are quite useful to stay on target.

Very cool!
Okay, so here’s my idea…

  1. Make a temp group in the database. Set the sort method to Unsorted.
  2. Do your search in your smart group.
  3. Select the desired pages, Control-Click them and choose Replicate to and replicate them to the temp group.
  4. Press Command-L to jump to that temp group.
  5. Sort as needed.

When you’re done, you can delete the replicants in this temp group with no ill effect on the other instances.

If you intend on making any edits to the documents, e.g., marking them up somehow, you could use duplicates instead.

1 Like

Thank you, I will give it a shot.

You’re welcome.
You could also have the temp group as a Favorite for quicker access in several situations.

Hello,
What seems to give me the least manual work is to use a custom meta data field and sort it by it in the smart group.
I’m new with AppleScript but this seems to do what I want [1].
The script tries to make provision for other potential field I might add.

I currently run that externally so I still need to understand how to inject it into DT.

My question is this: is there a way to loop through all documents of a group without going through the selection process which I see used a lot on the forum? ( set theRecords to (selection as list))

Regards,
Philippe

[1]

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

tell application id "DNtp"
	
	
	set theRecords to (selection as list)
	set myNumber to 1
	repeat with theRecord in theRecords
		set recordMetadata to (custom meta data of theRecord)
		
		try
			set mdstorystamp of recordMetadata to myNumber
			set custom meta data of theRecord to recordMetadata
			
		on error errMsg
			# for some reason if field never initialized, it is not part of the fetched record
			set newMD to {mdstorystamp:myNumber}
			copy newMD to recordMetadata
			set custom meta data of theRecord to recordMetadata
		
		end try
		set myNumber to myNumber + 1
	end repeat
	
end tell

Did you try what I suggested?

Honestly, not yet - I am still trying to find a way without manual interaction.

I have now:)
It is functional, thank you but does require manipulations I would like to avoid.

Note that I have already ~10 smart groups like that and am adding more so I would need, if I understood correctly, to follow the process any time I wish to look at any of those smart groups.

Just putting those groups in “sorted by “StoryStamp”” seems faster to me.