INTERACT FORUM

Please login or register.

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

Author Topic: Q: why does a list-field show all its values one-per-line but in expression not?  (Read 1440 times)

ShayB

  • Junior Woodchuck
  • **
  • Posts: 97

hi,

I tried to make a view pane to select files based on a partial list of a list-field.
when I just adds the field to the view-pane, each value (from the combined in-use values) is displayed in each row even that some files have multiple values on this field. this is good.

I built the expression: if( isequal([list_field],<string>,7),[list_field],) in the view-pane-expression instead of the field itself.
I thought that I will get the one-value-per-line as when using [list_field], but instead I got all the variations of the used-combinations values. I don't want that. I want each value in different line, what can I do?

Shay
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580

although im not sure what you try to do, adding a datatype = list makes a field behave like a list (minus the nesting)

so:
Code: [Select]
if(isequal([list_field],<string>,7),[list_field],)&DataType=[List]
hope it helps

 :)
gab

edit: this is also works for fields that are originaly not list type fields. for instance, when a song has several composers i  place them in the same field seperated with a ;
Code: [Select]
[composer]&DataType=[List] will give me a list the same as when it is a listed field.
Logged

ShayB

  • Junior Woodchuck
  • **
  • Posts: 97

Thanks gappie,

now its acts as I wanted. but now I can't use the "F4" (enable tagging) because the expression although consists of some of the field's values, I don't get the little rectangles to check..

maybe the whole approach was wrong. I wanted to create one "garbage collector field" so that I will not have to create different fields for each attribute that I think of. so, I created a field and filled it with values that tell me the quality of the song encoding, values that are genre-like, values that are situation-like, and so on.   each value is prefixed by a letter that will later help to split them into groups of values like I did.  The Idea was to reduce the amount of fields on the pane (same info in one column)

Shay
Logged
Pages: [1]   Go Up