INTERACT FORUM

More => Old Versions => JRiver Media Center 28 for Windows => Topic started by: stricko on January 13, 2022, 12:12:05 am

Title: Expression Sort / Grouping query
Post by: stricko on January 13, 2022, 12:12:05 am
Hi there,

So I'm in Theatre View, trying to resolve the issue about movies with the same title. Nothing clever, I'm trying to use the Year field to differentiate the movies. In my query grouping expression, I have the value [Name] [Year]. But this returns the following result

Toy Story 2 1999
Toy Story 3 2010
Toy Story 1995

How do I rewrite my grouping expression to put Toy Story at the top of the results?

Many thanks
Title: Re: Expression Sort / Grouping query
Post by: EnglishTiger on January 13, 2022, 02:26:52 am
Looks to me like the Sort is being done on Name - try changing it to Year or maybe Name within Year
Title: Re: Expression Sort / Grouping query
Post by: stricko on January 14, 2022, 05:51:53 am
Sorry, I probably didn't make myself clear. I definitely want the films sorted by name. It's primarily to resolve issues with multiple films have exactly the same name. Like Crash, True Grit, War of the World's etc etc etc. My query works perfectly for that. But, it has the wierd side effect shown in my original post.

I assumed that my [Name]  [Year] would either sort by name first, in which case Toy Story should come before Toy Story 2, or produce a string where Toy Story 1995. Should come before Toy Story 2

Or am I missing something. I tried exactly the same data in Excel, and the sort results are as I expect
Title: Re: Expression Sort / Grouping query
Post by: zybex on January 14, 2022, 07:43:55 am
Try:
Expression to group by = [Name]
Expression to Display = [Name] ​([Year])
Sorting: Ascending

You can also use a different expression on the "group by" and then set Sorting="Name".