INTERACT FORUM

Please login or register.

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

Author Topic: More expression fun!!  (Read 1500 times)

darichman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
More expression fun!!
« on: June 07, 2006, 07:08:17 am »

Heya...

I'm putting together a few expressions to put in the title bar for currently playing songs.

One I'm having trouble with displays a conditional string if the song is featured in a movie, TV show, musical etc. I store this information in a field called [Type 1]

--> example of a song featured in a film: "My Heart Will Go On" by Celine Dion, featured in the film "Titanic"

--> example of a song featured in a TV show: "Save Me" by Remy Zero, featured in the TV Show "Smallville"

Using the if(isequal.... function, this works fine for most files.

The only problem is that the expressions MC uses become really limited when you start dealing with list fields (ie fields with multiple entries delimited by semicolons)

eg: if(isequal([type 1],film,1),TRUE,FALSE)

Will output TRUE for files in which [Type 1] = Film (as expected)
But will output FALSE for files in which [Type 1] = Film; Album (bummer)

Sooo... I put the question out there, is there anyway to modify an expression to identify individual entries in a list?


As a workaround, I thought I could set up a smartlist (with a "[Type 1] = Film" search) and then use an expression to output whether the song belonged to the smartlist or not. But I can't seem to find an expression that deals with playlists either. Double bummer.

Anyone think of a workaround? This limitation will be really problematic for me when I really start to organise my media ~ most of my files belong to more than one category...


Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: More expression fun!!
« Reply #1 on: June 07, 2006, 08:06:03 am »

try using:

if(isequal([type 1],film,7),TRUE,FALSE)

does that work?

darichman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: More expression fun!!
« Reply #2 on: June 08, 2006, 01:38:11 am »

Marko to the rescue again! Do you, perchance, ride a white stallion?

That worked a charm. I didn't know the modes went up to 7 :)

Thanks again
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: More expression fun!!
« Reply #3 on: June 08, 2006, 02:22:50 am »

No white stallion, not any more. The wife sold it because it kept making a mess on the carpet!!

The modes actually go up to 8....

7 and 8 were dropped in courtesy of Matt (thanks again) and they apply the rule in the same way it would if you used the search bar.

So, if you typed ar=bob into the search bar, you'd get back all the bob's and bobby's etc. etc. that you have in your artist list, and if you used the following expression in the search bar, [=isequal([artist],bob,8)]=1, the result is exactly the same.

Use 7 for case sensitive compare and 8 for a case insensitive compare.
Much goodness can be achieved with these, especially when used in the display text for photo thumbnails.

-marko.

darichman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: More expression fun!!
« Reply #4 on: June 08, 2006, 02:26:24 am »

I'm just starting to figure out how useful these can be :)

Thanks again for your help, Marko.
Logged
Pages: [1]   Go Up