INTERACT FORUM

Please login or register.

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

Author Topic: Expression to count items of an artist?  (Read 1296 times)

minolotus

  • Junior Woodchuck
  • **
  • Posts: 93
Expression to count items of an artist?
« 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.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Expression to count items of an artist?
« Reply #1 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."

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

minolotus

  • Junior Woodchuck
  • **
  • Posts: 93
Re: Expression to count items of an artist?
« Reply #2 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.
Logged

Daydream

  • Citizen of the Universe
  • *****
  • Posts: 771
Re: Expression to count items of an artist?
« Reply #3 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?
Logged
Pages: [1]   Go Up