INTERACT FORUM

Please login or register.

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

Author Topic: Expression Mystery  (Read 2098 times)

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Expression Mystery
« on: March 07, 2010, 06:15:47 am »

I have created an expression to get one list with all my artists:

Code: [Select]
replace(ListCombine([artist],ListCombine([albumartist],[album artist])),/|,;)&datatype=[list]
The list works as expected when I paste the expression into a column in a pane view. But if I instead paste the exact same expression into a custom database field and set the same column to show that field, the list is the same but when I click in the list on some artists I just get the message "There are no search results in the current pane selection."

Any ideas why and what to do about it?

I would prefer to have the expression in a database field so that I can easily use it in several pane views. I have the same issue with another expression that adds composers as well:

Code: [Select]
replace(ListCombine(ListCombine([artist],[Composer]),ListCombine([albumartist],[album artist])),/|,;)&datatype=[list]
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Expression Mystery
« Reply #1 on: March 07, 2010, 07:00:51 am »

this is one of mc's mysteries. but it can be solved.
open the library manager, and go to your custom field. set it to user data. choose as datatype list. close the library manager and options.
now open the library manager again and go to the same field. set it to calculated data and use the expressions.

that should work

 :)
gab

edit: here is a post i explain it a bit better i think http://yabb.jriver.com/interact/index.php?topic=55276.msg376033#msg376033
Logged

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: Expression Mystery
« Reply #2 on: March 07, 2010, 07:11:24 am »

that should work

 :)
gab

It did. Thanks!

That one was not easy to figure out. I do hope a more user friendly approach is being developed.
Logged

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: Expression Mystery
« Reply #3 on: August 12, 2010, 09:59:11 am »

EDIT: Please disregard this message and instead read and reply to the one I posted in the current MC 15 forum where I intended to post the question: http://yabb.jriver.com/interact/index.php?topic=59113.0.

OK, I would really need some more help with the ListCombine() expression.

I have changed my tags and use ; as delimiter so the expression to join in a list type field all artists and composers is now just:
Code: [Select]
ListCombine(ListCombine([artist],[Composer]),ListCombine([albumartist],[album artist]))&datatype=[list]The field albumartist is collected from the albumartist tag in my flac files and the other fields are the standard ones.

I noticed that the expression did not work in the case where there was no albumartist or album artist (i.e. a VA album) AND there was only one item in artist and composer respectively. For such a file the expression would output only the composer value with an appended ";".

Just to investigate where the problem was I created a new list type field with just this expression:
Code: [Select]
ListCombine([artist],[Composer])&datatype=[list]
  • If artist is "Bonnie Tyler" and composer is "Jim Steinman" (for the song Total Eclipse of the Heart), the expression outputs just "Jim Steinman" (I would have expected "Bonnie Tyler;Jim Steinman").
  • If artist is "Bonnie Tyler" and composer is "Ronnie Scott; Steve Wolfe" (for the song It's a Heartache), the expression outputs "Steve Wolfe;Ronnie Scott;Bonnie Tyler" as I had expected.
  • If artist is "Bonnie Tyler" and composer is empty, the expression outputs "Bonnie Tyler;" (with an appended ";", but the field still works in panes).
  • If artist is "Bonnie "Prince" Billy; Will Oldham" and composer is "Will Oldham", the expression outputs just "Will Oldham; Will Oldham" (I would have expected "Bonnie "Prince" Billy; Will Oldham").

Am I missing something obvious? Is the behaviour I am seeing the intended?
Logged
Pages: [1]   Go Up