Help - Search - Members - Calendar
Full Version: facets question about not displaying empty fields
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
jayjo
I have an add-on column for ratings. If I set up Facets to show ratings, any songs that I have not yet rated do not show in the songs display - even when I click "All".

For example if my actual data was like this:
Track__Title_______Rating
1_____Song A_____5
2_____Song B
3_____Song C_____3

Adding a Facets column for %Rating% would only show this in the "Facets Selection" window even when I click "All" within the "Ratings" column:
Track__Title_______Rating
1_____Song A_____5
3_____Song C_____3

Since I'm not aware of a way to bypass a column when "All" doesn't show all the songs, is anyone aware of a workaround that will let me see all fields - even those that do not yet have a rating ?

Thanks.
fbuser
Use $if2(%rating%,0) instead of %rating%.
jayjo
QUOTE(fbuser @ Dec 2 2007, 01:35) *

Use $if2(%rating%,0) instead of %rating%.


I tracked down my problem. Since all of the default columns were put within brackets "[]", putting this in as:
[$if2(%rating%,0)]
did not work either.

However, when I removed the brackets and just put in:
$if2(%rating%,0)
then everything worked. When I just used %rating% and left out $if2(), Facets returned ? instead of 0, so your way was definitely better.

Thanks for your help.
start78
See facets FAQ:

QUOTE
Q: How does this component deal with tags that are not found, how can I control this behaviour?
A: It depends on the entered column pattern. %fieldname% displays "?" if the field is not present, [%fieldname%] supresses the "?" item, and $if2(%fieldname%,'('Unknown')') can be used to display "(Unknown)".


If you use $if2(%rating%,0), the files are shown in facet, displaying "0".
If you use %rating%, the files are shown, displaying "?".
If you use [%rating%], files without that tag won't be shown at all.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.