INTERACT FORUM
More => Old Versions => Media Center 17 => Topic started by: akhunaton on April 26, 2012, 07:02:44 pm
-
How do I write a custom rule to show both of these in the same place. I have created a library field called "Genre 2" because my wife wants to tag some of my music with genre "Belly Dance" but I want to keep them as "World". I am trying to make a view that shows all of the Belly Dance Genre and also includes files tagged with Belly Dance under Genre 2. This does not work> [Genre]=Belly Dance or [Genre 2]=Belly Dance
-
Create a new expression field and enter this:
[Genre]If(IsEmpty([Genre 2]),,;[Genre 2])&datatype=[list]
This will combine the two field into one.
-
Alternatively, let listbuild() do the work, replacing the if(). For a single string of semicolon/space-separated items:
listbuild(1, ;/ , [Genre], [Genre 2])
or for the items individually listed under an expression column:
listbuild(1, ;, [Genre], [Genre 2])&datatype=[list]
-
I am not sure how to enter this (listbuild) in correctly into the "set rules for file display" area. thanks.
-
Probably no need. Where are you trying to see/use these?
- as a category in a panes view?
- as a column in the file list?
- as a category in a categories view?
- as a category in Theater View?
-
I am using this as a library View called Belly Dance. Which contains all files tagged Genre=Belly Dance and all files tagged Genre 2=Belly Dance
thanks for your help.
-
Right-click the view, and select Customize view. What is the type listed under "View As" (the pull down)?
-
View as Categories
-
Customize the view. Remove the Genre category under "Show Categories In This Order", and Add a new category of type Expression, setting this as the value:
listbuild(1, ;, [Genre], [Genre 2])&datatype=[list]
Name it something like "Genres", or whatever you like. Move it to the top of the list where Genre was.
You're replacing the category being used to drill down with your combined category list.
-
Sweet! that worked beautifully, thanks! :D
-
whoops. Actually no it did not work. What now is needed for it to show genre=Belly Dance or genre 2=Belly Dance?
-
Ah, I see, you're creating a view that shows ONLY tracks with Genre or Genre 2 containing Belly Dance.
Set the rules for file display to this (you can use the Import/Export button to copy/paste)
([Genre]=[Belly Dance] or [Genre 2]=[Belly Dance])
Note the parens - they mean OR. You'll see them after you click OK in the wizard.
You can remove that Genres category expression created earlier.
-
Perfect! many thanks.