Instead of using "Library Field", instead try "Expression". In that dialog you can enter an expression to group by and another to display. By including your sorting field, in the grouping expression, it will effectively sort by this field. Unless I'm mistaken.
Give it a try and see if it works for your needs.
Brian.
Thanks Brian. I went down this path, but I'd like to decouple the grouping and sorting. I'm using a custom field "Disc Subtitle" for audio files. It's something MusicBrainz tags them with, so I'm seeing what can be done with it.
In the expression field I have:
If(IsEmpty([Disc Subtitle]),, [Disc #][Disc Subtitle])
And the view field is:
[Disc Subtitle]
This works well for most cases. When drilling down you get Artists->Albums->Disc Subtitles->Track List. And the Disc Subtitles level is sorted by the Disc # field.
Where it doesn't work is when multi-disc albums have the same Disc Subtitle. In this case for example, Depeche Mode 101 is 2 discs. I've subtitled both discs as "5.1 Mix". And another set of both discs as "Stereo Mix". With the above expression and view it gives me two of each. I'd like tracks from disc 1 and disc 2 of each mix grouped together.
I know there are other ways to get some of this done, such as fudging the album names, but I like the clean look of drilling down to get to what I want. I could just subtitle this specific case as "5.1 Mix Disc 1", etc, but that groups the discs separately. This method gives me more control, since clearing the Disc Subtitle field results in a combined tracklist of both discs.
This brings me to this expression:
If(IsEmpty([Disc Subtitle]),, [Disc Subtitle])
That groups by Disc Subtitle if the field is populated. But how do I then sort those groups by [Disc #], if that field is populated?