INTERACT FORUM

More => Old Versions => JRiver Media Center 19 for Windows => Topic started by: locust on August 17, 2013, 05:40:50 am

Title: Expression based categories can define separate grouping
Post by: locust on August 17, 2013, 05:40:50 am
Interesting.. Will this work on panes??

Thanks
Title: Re: Expression based categories can define separate grouping
Post by: MrC on August 17, 2013, 05:47:29 am
Please elaborate....
Title: Re: Expression based categories can define separate grouping
Post by: locust on August 17, 2013, 12:00:24 pm
For example a pane based on album artist using, GroupCount(...) that will count albums..

So the pane would display Artist (Count)

Similar to the variable expressions you helped me with that counts items within a category.. If possible this way would be much more efficient I imagine rather than using global variables..
Title: Re: Expression based categories can define separate grouping
Post by: Fabricio on August 17, 2013, 02:00:45 pm
Please, a picture ...
Title: Re: Expression based categories can define separate grouping
Post by: MrC on August 17, 2013, 02:44:10 pm
I posted briefly about this in the Beta forum:

GroupCount() and GroupSummary() can be used ... in a Categories expression by using different expressions to group by and display.  For example:


Expression to group by:
[File Type]

Expression to display....
[File Type] /(GroupCount()/)

This would group by file types, but show you file types followed by the count of the given file type.
Title: Re: Expression based categories can define separate grouping
Post by: Fabricio on August 17, 2013, 03:02:10 pm
I understood.
Thank you.
Title: Re: Expression based categories can define separate grouping
Post by: locust on August 17, 2013, 10:45:06 pm
Thanks :)
Title: Re: Expression based categories can define separate grouping
Post by: locust on August 26, 2013, 11:01:39 am
Been monkeying around with this, I can't for the life of me figure out how to sort by groupcount()

Expression to group by
[File Type]

Expression to display
GroupCount():/ [File Type]

So it would display like
250:Mp3
500:Flac

Instead it shows like
500:Flac
250:Mp3

Any ideas? I think it's I thought about also using groupcount in the group by field but no luck.. Is this a limitation?

Thanks
Title: Re: Expression based categories can define separate grouping
Post by: MrC on August 26, 2013, 12:12:37 pm
I believe the Group* Functions don't have meaningful values until after the groupings have been created.

The "Expression to display..." is not the sort key, rather the "Expression to group by" is.  But if you place GroupCount() there, the values will all be 1 because the groupings have not yet been made.

I don't think you can use Group* yet in this fashion.
Title: Re: Expression based categories can define separate grouping
Post by: locust on August 26, 2013, 12:19:52 pm
Thanks, hopefully this will be added, it's be a shame not being able to sort that way.

I wonder the reason groupcount can't be used in expression to group by.
Title: Re: Expression based categories can define separate grouping
Post by: MrC on August 26, 2013, 12:27:49 pm
My hunch is that the software that creates the groupings is at a lower level than the software that later counts those groupings.  Example pseudo-code:

   groupings_list = CreateCategories(current_category_expression)
   category_count_list = GroupCount(groupings_list)
Title: Re: Expression based categories can define separate grouping
Post by: locust on August 26, 2013, 12:44:46 pm
so no real workaround without some tweaks.

Would it be possible to add a switch to groupcount, so if you used groupcount in expression to group by, it could add a temp marker later to be replaced by one extra routine that would recalculate the group by field with the replacing the temp markers with the counts from the expression to display.. Like that no major overhaul would be needed.. Maybe a bit sloppy but I can't think of any other logical way without redesign..
Title: Re: Expression based categories can define separate grouping
Post by: MrC on August 26, 2013, 01:32:10 pm
The only current means is to use global variables as we've done in other examples.