Windows Libraries Grouping Order

Thank you Leo et. al.! Just paid to upgrade our license(s) and was glad to spend the money; DO is a very valued piece of software for us. :wink:

In evaluating and integrating v13 into our system, I decided to venture into a small project I had previously shelved due to time/discouragement issues related to Windows Libraries not working on unindexed drives. Buoyed by the enthusiasm of integrating v13 onto our machines, I decided to tackle it once and for all.

The project is simply to create a Windows LIbraries implementation of our household "Relationship Register". The idea behind the registry, is simply a structured set of directories that contain all information that cannot be stored in a PIM, such as Outlook, and that forms a comprehensive repository of all files pertaining to a particular PIM entry, as in Outlook Contacts. (The script for this Support Request is, as an example, stored in "Relationship\Public\Vendor\GPSoftware", along with our license key, etc.)

After having gone through the research and efforts of re-homing the "Relationship" directory locally and setting up a peer-to-peer sync to overcome the Windows Libraries technical limitations, I am pleased to report a successful outcome on the Windows side of things -- the library works!

One of the key features/benefits of my choice to use the Windows Libraries functionality, is the ability to over-ride the sort order of a regular folder based on the order in which the folders are added as library locations.

In File Explorer, the added-folder-order is preserved, (as evidenced above), but I'm having no luck achieving the same structure in Opus.

image

What I've tried:

  1. all hits from forum search for "Windows Libraries Grouping Order"
  2. all hits from initiating this support request
  3. every combination of "Explorer Replacement" options I could come up with, including reboots between changes

  1. every combination of Folder Format > Grouping I could conceive of (I was hoping to see a "Windows Libraries default" as a selectable item under "Sort groups").

image

The desired result, for this and several other similar projects I will be implementing, is:

  1. implement the Windows Library functionality in DO,
  2. while preserving the standard added-folder-order structure (graphic two)
  3. but using the (much neater) DO "Parent-folder-only" rendering (graphic three)

Now I'm 100% positive that I'm not as smart or talented in this area as the fine folk at GPSoftware, (I'm just a poor schlub trying to manage a highly-productive IT system for a family of four), but I'm willing to dig into the inner workings of DO to get this to work; I'd even attempt a little scripting if you would be so kind as to get me rolling! :wink:

In hopes of a timely resolution, in good humour, and with kind regards to the GPS team,

Oliver

Folders below libraries aren't treated specially, and will be displayed according to the sorting (or grouping) criteria in the file display.

You might be able to use Preferences / File Display Columns / Evaluator Groups to make a custom grouping.

(Alternatively, Evaluator Columns could be used to create a column you can group by which adds a number to the parent folder names to sort them that way. Slightly less complex but also not as good.)

Is there a way to preserve the order in graphics 1 and 2 using Evaluator Groups? I looked into this new-to-me feature and didn't find anything pertaining to the particular sort order Windows Libraries applies, based on the added-folder-order.

I get what you're saying about a numbering prefix on folders to force the sort order; I've done that to structure many other things in our digital files. The whole point of my selecting Windows Libraries was to utilize the "a-la-cart" folder ordering that is possible with that feature.

A trick I used in the past for some folders to enforce a custom sorting order without using the names was the Description field and using Description as the default sortby field.

image

For folders the comment field is used instead of description for the same field in metadata pane, but it works nonetheless.
image

Hope it helps.

Thanks for the suggestion, cyilmax!

I'm guessing sort order, both for directories and groupings, is a bit of an issue for Windows users -- as I've seen plenty of discussion around that topic in many forums over the years. I myself have used suggestions like yours extensively; but for me, in this case, it won't work. (I've utilized the "Description" and "Comments" fields both for their intended purpose and to implement hacks, so in many cases they're "used up".)

What I'm actually hoping for is a way for DO to interpret the structure Windows Libraries uses, so that the custom sort order, (determined by the drag-and-drop sort function of the "Library locations" dialogue box in "Properties"), is preserved. That way, this feature could be used as a dashboard for any group of folders, displayed in any order that makes sense for a particular dashboard.

Yeah, unfortunately I cannot offer you a drag and drop solution for sort ordering.

But maybe you could use DOpus-builtin collections instead. The same workaround/trick works for Collections, albeit via right click -> properties -> set description button and I'm pretty sure you wouldn't use up collection descriptions for other purposes, since they're basically smart containers only within DOpus.

IMHO, Collections are superior to Libraries as far as my needs are concerned, but obviously you might have different requirements. Just throwing out ideas out there.

EDIT: LOL actually DOpus apparenly already supports "custom sorting" for collections, haven't tried out, but it's there under Folder Options.

EDIT2: Yep, including drag & drop sort. I'd definitely give Collections a shot.

Collections may not work well if you want to share things between people/machines.

Bummer :expressionless: I see they're simply under %UserProfile%\AppData\Roaming\GPSoftware\Directory Opus\Collections. What if a script would auto-sync the contents to a shared folder, which User B also syncs at DOpus start after logon, would that work? Maybe via some external tools or Windows scheduler.
I know it's some extra work and kinda delicate though, not turnkey.

But now that I discovered manual sorting is a thing for collections, I will use them more :smiley:

That would only work if you never modified the collection while both machines were running. Otherwise the two copies are going to start overwriting each other.

We've got the syncing issue sorted out by having our machines in a "master" and "replicates" relationship; all changes are made on the master machine, and propagated via a complete periodic settings replacement (marshalled on a network drive) on the replicate machines.

We also have a Layout that puts all of our dopusdata aliased directories side-by-side to facilitate copying bits of our configurations to the master machine, to ensure lasting changes to replicate machines are always fed back to the master.

Replication issues aside . . .

While I appreciate, and am familiar with, your suggestions about collections, I'm still hoping that someone with superior technical knowledge knows how to get DO to interpret the standard presentation structure of Windows Libraries. Is there coding/syntax that can be used in Evaluator Groups or some other way to achieve this? Collections, while a close parallel to Libraries (to my understanding), is not exactly what I'm looking for.

I don't think there's a way to do it currently. Basically Opus treats the contents of a library as if it were one big folder, and sorts it that way. It doesn't pay attention to the order of folders listed as sources for the library. I don't think I even knew that Explorer paid attention to that.

Yeah . . . I had been attracted to that particular feature when it first came out in Windows, for precisely that folder-by-folder control of the order of presentation. But I digress, as that was before I discovered your amazing product! :wink:

If the interpretation of that structure by DO is something that is possible, and you saw fit to add it as an in-build selector for grouping in a Libraries view, I would be an even bigger fan of GPS's. (I wasn't able to get the Windows shell view for Libraries functioning in DO).

In the mean time, having heard from both Jon and Leo, (and taking that as definitive word on the subject), I'll "sign off" of this thread.

With my thanks for your timely support on this issue and your fantastic product! I can't tell you how many hours DO has saved me and my family, and we will continue to support and evangelize for GPS!

1 Like

I was torn whether to start a new thread, because, according to Leo's reply, the resolution path for the OP is likely best implemented as an Evaluator Group. I'll leave it to your discretion whether I should re-post this anew. In the mean time . . .

I have the following folder breakdown "gathered" into a Windows Library; each of the lower-level folders are members of the library . . .

image

. . . added in order of desired utility, and maintained in that order by the Properties of the library . . .

As was pointed out in replies to the OP, the Windows Library sort order is not maintained by Directory Opus, as it treats the folders of a library no differently than any other folder. Thus, when attempting to achieve the desired order by applying a Parent Folder group sort, the result is:

image

I have no idea why that order is as it is, because the Folder Settings in that category are:

image

Regardless, the point of this present pursuit is to create an Evaluator Group which will take control of the group sort to achieve:

1 Kin
2 Friends
3 Acquaintances
4 Government
5 Disposition
6 Economics
7 Utilities
8 Associations
9 Wellness
10 Vendors

In my (newbie) attempts to utilize the Evaluator Groups function, I got a working result using a dynamic group with the following evaluator clause(s):

image

Which yields the following not-as-desired group sort:

image

Attempting to go further -- by using the Static Groups function to facilitate the desired group sort order -- after having tried a few dozen clauses and syntax changes, I am now utterly stuck. The best I've been able to achieve, was using the clauses below, after having attempted many combinations including "parentpath", "match", "value", "str", "group", etc.. . .

I got only a single group as a result:

image

Help me Obe-Wan Kenobi; you're my only hope! :wink:

You need to use double = for the if clauses.

Wow . . . thanks for your near instantaneous reply!

Huge improvement with the double "==", but still not quite there; sort order is off. Any thoughts?

image

Leo, Jon and lxp's advice solved the issue. After I exited and restarted DO, (perhaps clearing a cache?), everything is working great. Thanks for the great support! :smile:

Check how I set order in this evaluator group

days = DateDiff("d", created, Now());
groupName = "";
groupDayNumber = DatePart(created, "MMM") + " " + DatePart(created, "d") + (Right(DatePart(created, "d"),1) == "1" ? "st" : Right(DatePart(created, "d"),1) == "2" ? "nd" : Right(DatePart(created, "d"),1) == "3" ? "rd" : "th");
groupDayName = " " + DatePart(created, "dddd") + " ";

orderOut = 0;

if
(days < 1)
{
  groupName = "Today";
  orderOut = 1000;
}
elseif
(days < 2)
{
  groupName = "Yesterday";
  orderOut = 900;
}
elseif
(days < 3)
{
  groupName = "2 days ago";
  orderOut = 800;
}
elseif
(days < 4)
{
  groupName = "3 days ago";
  orderOut = 700;
}
elseif
(days < 5)
{
  groupName = "4 days ago";
  orderOut = 600;
}
elseif
(days < 6)
{
  groupName = "5 days ago";
  orderOut = 500;
}
elseif
(days < 7)
{
  groupName = "6 days ago";
  orderOut = 400;
}
elseif
(days < 8)
{
  groupName = "7 days ago";
  orderOut = 300;
}
else
{
  groupName = "More than a week ago";
  groupDayName = "";
  groupDayNumber = "";
  orderOut = 100;
}

groupName = groupName as "%-20" + groupDayNumber as "%-30" + groupDayName as "%-43";

return [name = groupName; order = orderOut;];
1 Like

Cool! :wink:

Obviously your Evaluator script doesn't have the same purpose as what my OP was intending, but I get that it shows a valuable way to order things for any number of scripts that don't use Static Groups.

After having seen the implementation of the end result of the OP -- achieved using Static Groups and plenty of help from moderators/users -- my wife already wants me to set up ordered groupings for our accounting documents. It looks like your script will provide an excellent basis for "time-grouping" and ordering that continuously-incoming stream of files using a Dynamic Group.

Thank you!

1 Like