Sorting Custom Dates -- Collections Help


Here’s the problem:

(1) In the Binder, I have the following structure. In Research, there is a folder named Sources. Within it, I have four folders (Book, Article, Archive, Thesis). Within each of those I’d like to nest a bunch of folders, each corresponding to a given book, article, etc… Within each of those, I’d like to nest a group of text documents, each one for a note taken from that particular source. Thus, the structure would go something like this . . . Source>Book>Smith, History of Cucumbers>Note 1, Note 2, Note 3 etc. This is so I know that when I click on Note 3 somewhere along the way I’ll always know where it came from.

(2) The reason I need to have unimpeachable sourcing is because I’ve added a Date field to Custom Meta-Data. Each Note is given something like this: 1775-05-23 (yyyy-mm-dd) so I can sort it as ascending or descending. Over time, as I amass, say, 2,000 notes, I need to be able to see their chronological order – notwithstanding their source – in one fell swoop. In other words, they’re going to be taken from multiple sources but I need them in strict order in the Outliner.

(3) Now, I see how I can jerryrig this ability by constructing a flat list from the get-go. Thus, get rid of the Book, Archive, Article folders and just create a list of 2,000 notes in the Outliner with maybe a Custom field called “Source ID” that tracks back to a universal document listing all the sources. Thus, “013” would refer to the thirteenth source I consulted (Smith, A History of Cucumbers) and I would add another Custom field for page number(s).

(4) However, the ability to keep a nested hierarchy would be immensely useful. The problem here, as you may have guessed, is that you can’t sort Custom fields in a nested hierarchy. (Or rather, you can – but only folder-by-folder, which is not really helpful in this context.) I’m looking for a way to over-ride the folder structure so as to encompass all the notes at the same time.

(5) Through reading the Manual and searching through the Forum, I’ve gleaned that perhaps Collections could serve my purpose. But I’m afraid I’m a bit at sea as to how Collections work. I’ve tried setting one up called Date Order but I can see no way of sorting the notes by date, only by label/type. I should add that I don’t need to Search for a specific date (in which case I could just search Custom meta-data), I’d just like to see everything in chrono order to get the bigger picture. [I also know that I can export to Aeon, but I’d like to do that at the end, not on the fly.]

(6) The essential problem is that I don’t quite understand Collections, except in the vaguest sense, though I’ve tried grappling with it for hours.

OK, so does anyone have a solution here? Can what I want to be done be done? Hope you can help.

Collections are essentially flat, I’m afraid.

If the big picture is what you’re after, my suggestion would be just sync to Aeon. Even if you could sort everything within Scrivener you’d still have every date at the same “distance” from the next one (one line per document), and you’d be able to see only as many events fit on one screen at a time.

Aeon would provide you a true big picture with the zoom level you prefer and also show you how events accumulate in time.

You don’t need to sync only at the end. You may sync several times during the development of the project.

Just my 2 cents.

Thanks – your 2 cents are very valuable. Still somewhat confused: So you’re saying that there is no way to override a folder hierarchy in Outliner?

Yes, I would not suggest you destroy your hierarchy just for the sake of search. Scrivener has good enough tools for building a flat list out of nearly anything, even dynamically, and indeed Collections are the way to go. You can have items in a carefully organised tree of topics, but also view those items divorced from that setting entirely—and easily get back to the original in the tree if you ever need to. You can jump into a Collection with all of the references in a flat list sorted by date, find the thing you want, and hit Opt-Cmd-R to get back to its literal location in the Binder.

So this problem could be easily solved with a precise search in custom meta-data fields (you can constrain the search using the magnifying glass menu), and then looking only for things that look like dates. The best tool for that is to set the Operator to “RegEx” and paste in this search pattern: \d{4}-\d\d?-\d\d?. That will only find values that start with four digits, and then have a pair of one or two digits clusters after that, separated by hyphens.

Okay, now you have a search result with presumably everything that has been tagged with a date in custom meta-data—now to save the search so you don’t have to keep doing that. Go back to the magnifying glass menu and choose “Save Search as Collection…” at the very bottom. Give it a useful name, and now you’ve used the Collection feature. :slight_smile:

You can close the tabs if you want, and just get there by using the View/Collections/Name of Your Search menu command.

The other type of collection isn’t dynamic like this, bound a search setting, but rather only composed of things you add yourself, and in the order you determine for them. You can think of those as being a bit more like the Dock—at least the part where you can add applications, files and folders to your Dock but they aren’t actually in the Dock right? Same goes for Collections, the items are “in” the Collection, they are merely referenced by it. So these are going to be handy whenever you want to pull x files from wherever they may currently be in the Binder, and produce them as a list.

The final piece of this, if I understand the original request rightly, is that once you’ve created the search collection as Ioa described, you can load that collection in the outliner by clicking the collection’s title in the binder header bar. Then in the outliner, you can sort the list by toggling the custom meta-data “Date” column header (ascending, descending, sort off). Since the collection is a flat list, you’ll get all your notes sorted by their date, regardless of where they reside in the binder hierarchy.

You are meddling with some very Dark Magic here, AmberV and MM. It took me a little while to work out how the dynamic Collections system worked (I was initially using static ones), and there’s no way I would have worked out the RegEx formula, but now I think I understand it. It’s fantastic. Seems to me that they’re similar to Smart Groups or Smart Folders. Thanks a million – you really helped me out here.