INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Custom Sort Expression  (Read 858 times)

duskdrums

  • Recent member
  • *
  • Posts: 39
Custom Sort Expression
« on: March 17, 2013, 06:02:00 pm »

Hi. Did some searching but couldn't find anything right on point. Thought i'd ask for some help in creating some custom sorts.

I have a view for my movies that has categories of Academy Award categories, and I've created semicolon delimited lists for each movie in my collection for each award that a movie has won. (I've also done the same with nominations). In this view, I would like to sort by an arbitrary listing of the Award categories so that rather than listing them in alphabetical order, they are listed in the order I deem most important (ie Best Picture, Best Director, Best Actor, Best Actress, Best Supporting Actor... etc.). Is there an easy way to make an arbitrary sort order?

A similar request, but maybe a bigger lift. I also have a view that lists movies by director. Lots of the movies in my collection are by directors that aren't a big deal, but some are. I'd like to sort my directors by importance. I think one way to do that would be the # of academy awards nominations (either best picture or best director) that their movies have gotten. Ideally this would be of all their movies, not just the ones in my collection, though I realize that this might be hard to do. Otherwise, maybe an expression to sort directors by # of best director academy award nominations that director has.

Any help would be much appreciated!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Custom Sort Expression
« Reply #1 on: March 17, 2013, 06:55:08 pm »

Sorting in MC is ASCII sort order, with some intelligent numeric handling.

You can define your view using a Search List, where each search list criteria is given :

   1. Best Picture
   2. Best Actor
   3. Best Director
...

and use this as the basis of sorting.  The numbers will do the sorting.  Then, you can customize the Thumbnail text to remove the numbers:

   regex([Name], /#^\d+\. (.*)$#/, 1)

See attached screenshots.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up