INTERACT FORUM

Please login or register.

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

Author Topic: Expression Help - IsEqual() in Thumbnail Text  (Read 2261 times)

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Expression Help - IsEqual() in Thumbnail Text
« on: September 04, 2010, 10:43:54 am »

I use this expression in a thumbnail text expression:
Code: [Select]
If(IsEqual([Genre],Live,7),/[Live/] ,)
In genre I use a list. If all tracks in an album contain genre "Blues;Live", [Live] shows up in the thumbnail text. If one or more tracks in that album has genre ""Blues;Live;Bonus Track", [Live] does not show up in the thumbnail text. Any idea why?

I use the same expression in a MC field I use to group albums by and [Live] shows up in the group heading also in the second case (an album having tracks with different genre tags all though containing Live).

Btw here is the entire expression for the thumbnail text (if that could be of importance):
Code: [Select]
Clean([Album] • If(IsEqual([Blandade artister],1),Blandade artister,[Album Artist]) If(IsEqual([Genre],Live,7),/[Live/] ,)If(IsEqual([Genre],Compilation,7), /[Comp./] ,)If(IsEqual([Genre],Soundtrack,7), /[Soundtrack/] ,)
If(IsEmpty([Album Rating]),, Left(★ ★ ★ ★ ★ ,Math(Left([Album Rating],1)+Left([Album Rating],1)))If(IsEqual(Mid([Album Rating,0],2),5,2),☺ ,))(FormatNumber([Track #],0,Ingen låt,låtar,låt)))
Clean(If(IsEmpty([Date]),Okänt år,FormatDate([Date, 0], Year))
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4583
Re: Expression Help - IsEqual() i Thumbnail Text
« Reply #1 on: September 04, 2010, 11:03:00 am »

nice expression..  8)
interesting that it does not show up when the values are not the same for every track. i have no idea why. the first thing i could think of, is to make a calculated field for live, which just say if they are live or not, and use that for the thumb (same for soundtrack and compilation). this makes of course only sense when these are the 'only' fields that have special interest for you.

 :)
gab
Logged

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: Expression Help - IsEqual() i Thumbnail Text
« Reply #2 on: September 04, 2010, 11:45:20 am »

the first thing i could think of, is to make a calculated field for live, which just say if they are live or not, and use that for the thumb (same for soundtrack and compilation). this makes of course only sense when these are the 'only' fields that have special interest for you.

Thanks for the reply! A workaround is of course to make an album type field so I made a field with this expression and referred to the field in the thumbnail text expression:
Code: [Select]
Clean(If(IsEqual([Genre],Live,7),/[Live/] ,)If(IsEqual([Genre],Compilation,7), /[Comp./] ,)If(IsEqual([Genre],Soundtrack,7), /[Soundtrack/] ,))
It works. (The other types I use, apart from Bonus Track which is track based and does not make sense in an album thumbnail text, are EP and Single, but I have appended [EP] and [Single] to the album names so they already show up in the thumbnail text.)

I think I will report this issue as a possible bug (it would not be the first time when a function did not produce the advertised result...).
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Expression Help - IsEqual() in Thumbnail Text
« Reply #3 on: September 04, 2010, 03:05:10 pm »

Quote
it would not be the first time when a function did not produce the advertised result...

Are you using a Categories view? If so, does your original expression work in a Panes view? I'm wondering if the issue is the expression cannot be evaluated as you would expect in a Categories view—because the applicable file selection (e.g., Genre) has already been made. :-\
Logged

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: Expression Help - IsEqual() in Thumbnail Text
« Reply #4 on: September 04, 2010, 04:34:13 pm »

Are you using a Categories view? If so, does your original expression work in a Panes view? I'm wondering if the issue is the expression cannot be evaluated as you would expect in a Categories view—because the applicable file selection (e.g., Genre) has already been made. :-\

It is a categories view, but it is the recent album view, not filtered by genre. The only category in that view is a field with this expression:
Code: [Select]
Clean(If(IsEmpty([Date]),Okänt år,FormatDate([Date, 0], Year)) - [Album] If(IsEqual([Genre],Live,7),/[Live/] ,)If(IsEqual([Genre],Compilation,7), /[Comp./] ,)If(IsEqual([Genre],Soundtrack,7), /[Soundtrack/] ,)If(IsEmpty([Album Rating]),, Left(★ ★ ★ ★ ★ ,Math(Left([Album Rating],1)+Left([Album Rating],1)))If(IsEqual(Mid([Album Rating,0],2),5,2),☺ ,))/(If(IsEqual([Blandade artister],1),Blandade artister,[Album Artist]))/)
In panes view grouping by a field with that expression works as expected (the group heading includes [Live] where Live occurs in genre of all tracks belonging to an album).
Logged
Pages: [1]   Go Up