INTERACT FORUM

Please login or register.

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

Author Topic: q: how do I show some of the values of a field in a pane?  (Read 1900 times)

ShayB

  • Junior Woodchuck
  • **
  • Posts: 97
q: how do I show some of the values of a field in a pane?
« on: October 16, 2008, 08:30:40 am »

hi,

I defined an audio field (list type) that contains additional values (live, remix, ..., which mp3 decoder version and other quality attributes) that I need (it's a collection of all attributes that I add on the fly without the need to add many fields).
I use a prefix for each group of values. for example for quality level I use "Q <values>"  for genre "G <values>" ...

now, I want that in a specific pane I will only see the values with prefix "G ".  I guess I need to use expression (I can't use search-list because the values keep changing (added/removed) )

can someone help me to do that?

Shay
Logged

lise

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 946
Re: q: how do I show some of the values of a field in a pane?
« Reply #1 on: November 12, 2008, 03:16:44 pm »

I was just trying to do a similar thing, but with keywords.

If keyword 'hits' is present, then display Hits in the pane, otherwise show Unassigned.
If keyword Top 40 is present, then display Top 40 in the pane, otherwise show Unassigned.

Here is the thread that got me going: http://yabb.jriver.com/interact/index.php?topic=43624.0

Unfortunately for me, many of the entries that have Top 40 also have Hits, and I can't figure out how to display them twice, under Top 40 and Hits. Back to the drawing board for me. You might have better luck.
Logged
A wise man once said don't count your years, but make your years count. Or was it beers?

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: q: how do I show some of the values of a field in a pane?
« Reply #2 on: November 12, 2008, 03:30:08 pm »

hi,

I defined an audio field (list type) that contains additional values (live, remix, ..., which mp3 decoder version and other quality attributes) that I need (it's a collection of all attributes that I add on the fly without the need to add many fields).
I use a prefix for each group of values. for example for quality level I use "Q <values>"  for genre "G <values>" ...

now, I want that in a specific pane I will only see the values with prefix "G ".  I guess I need to use expression (I can't use search-list because the values keep changing (added/removed) )

can someone help me to do that?

Shay
yes you will need an expression for that, and it can be a bit long. can you give a specific value you use, how are the G and the <values> seperated? how many values are mostly there. you might want to check the wiki if you havent already: http://wiki.jrmediacenter.com/index.php/Media_Center_expression_language

i would like to try to help, but need more and specific info...

 :)
gab

Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: q: how do I show some of the values of a field in a pane?
« Reply #3 on: November 12, 2008, 03:39:02 pm »

I was just trying to do a similar thing, but with keywords.

If keyword 'hits' is present, then display Hits in the pane, otherwise show Unassigned.
If keyword Top 40 is present, then display Top 40 in the pane, otherwise show Unassigned.

Here is the thread that got me going: http://yabb.jriver.com/interact/index.php?topic=43624.0

Unfortunately for me, many of the entries that have Top 40 also have Hits, and I can't figure out how to display them twice, under Top 40 and Hits. Back to the drawing board for me. You might have better luck.
would this do it for you?

Code: [Select]
if(isequal([keywords],hits,8),Hits,und);if(isequal([keywords],Top 40,8),Top 40,und)&datatype=[list]there would be other options also, but this one is easy to make bigger. just seperate the if statements with ; and add the datatype ate the end.
let me know if you need some more help.

 :)
gab
Logged

lise

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 946
Re: q: how do I show some of the values of a field in a pane?
« Reply #4 on: November 12, 2008, 03:45:24 pm »

gappie, thanks a million! That did the trick.

Of course, just before reading your answer, I found another way (don't know why it didn't occur to me first).
Instead of using an expression pane, I set up a search pane, with three searches: 
keywords=Top 40
keywords=hits
keywords=Top 100.

This also worked perfectly.
But I do appreciate your solution, especially because it has made me understand expressions a bit more.
I'll try it out on other things.

Edit: Actually, the expressions solution works best, because the relevant keywords show up in the pane only when they apply, whereas the search solution always displays the three keywords in the pane, even when there are no hits for them.

So thanks again.
Logged
A wise man once said don't count your years, but make your years count. Or was it beers?
Pages: [1]   Go Up