INTERACT FORUM

More => Old Versions => Media Center 16 (Development Ended) => Topic started by: minolotus on May 28, 2011, 04:29:39 pm

Title: Expression to count items of an artist?
Post by: minolotus on May 28, 2011, 04:29:39 pm
Is there a way to build an expression which counts how many items in my database are related to a specific artist? I use the artist field for my TV shows to store a poster for the TV show. In the theatre view I organize the TV shows by the artist field so it shows the poster of the show (instead of a stack of the screenshots). The caption of the poster is the name of the TV show only but I would like to add the numbers of the episodes of the TV show. But I do not know how (or if) this could be done.

Thank you very much  in advance.
Title: Re: Expression to count items of an artist?
Post by: marko on May 29, 2011, 03:18:35 am
Firstly, welcome to Interact :)

Generally, this is not possible due to the way that expressions are implemented. You can read more here: "Any given expression can only work on any given single file. It is not possible to compare a field in one file with a field in another file." (http://wiki.jriver.com/index.php/Media_Center_expression_language#Overview)

However, if you are in a "Category" view, and it sounds as though you are, try the following:

Hover the mouse over the view header tab until the the menu appears, then choose "Thumbnails > Thumbnail Text"
Add "[Track #] Episodes" (without quotes, unless you want them) and press OK.

Does that work?

-marko
Title: Re: Expression to count items of an artist?
Post by: minolotus on May 29, 2011, 04:50:33 am
Thanks for your answer, Marko.

Your solution works very well in standard view with categories.  :)

Is it also possible to get this for the theatre view? I did not find a way to change the caption there. The entry under options - theatre view - advanced - file caption does not help. I also tried to change the content of the library item from "artist" to "artist [Track #] Episodes" but this did not do it either (except that MC shows stacks of screenshoots instead of the poster for the TV show  ?).

Thanks in advance.
Title: Re: Expression to count items of an artist?
Post by: Daydream on May 29, 2011, 03:15:14 pm
Generally, this is not possible due to the way that expressions are implemented.

And I wonder what way is that. This is neither close to Excel, nor to SQL (paint me surprised this being a database and all...).

I wish there was more a straight up Count expression to help with statistics in general. Am I looking at this the wrong way and there was an alternative concept at work here when expressions were implemented?