Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Hiding Empty Fields (Read 222 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Hiding Empty Fields

I have a panel that displays composers, however I only use the field for my favourite artists and as a result have many songs that have an empty composer field. These empty fields are still being displayed though and I would like to hide it. I'm still new to foobar so I'm not very familiar with the functions that would go about doing this. I'm just using [%<composer>%] right now.

(It is technically a drop down so the full line is [%<composer>%]|%<album artist>%|[%album%]|[[%discnumber%.]%tracknumber%] [%track artist% - ]%title%| but the main issue is with the composer field).

Re: Hiding Empty Fields

Reply #1
What is the panel / component you are using?

Re: Hiding Empty Fields

Reply #2
It's a Spider Monkey Panel, but its just acting as an album list that I've customized with a composer view.  The different views seem to use normal foobar syntax and functions so I assume it's not an issue?

Re: Hiding Empty Fields

Reply #3
These are the different views in the panel properties, but I'll only be using composers for this panel.

Re: Hiding Empty Fields

Reply #4
I see. If you only want it to show tagged composers, wrap the entire view pattern in an $if statement -

Code: [Select]
$if(%composer%,%<composer>%|%<album artist>%|[%album%]|[[%discnumber%.]%tracknumber%] [%track artist% - ]%title%)

Of course you'll be missing tracks not tagged with composers, so it would not be a complete list of your library.

Alternatively, you could put a "(No Composer)" entry instead (where you had a blank space before) to list all tracks -

Code: [Select]
$if2(%<composer>%,'(No Composer)')|%<album artist>%|[%album%]|[[%discnumber%.]%tracknumber%] [%track artist% - ]%title%

Or, you might prefer to setup a filter instead (assuming Library Tree script, with filter button top right) so you can click the filter on and off to show tagged composers or complete library -

Code: [Select]
%composer% PRESENT

(Under "View Filters" in Panel Preferences)


Re: Hiding Empty Fields

Reply #5
Thank you, the first statement was what I was looking for, and I appreciate the alternative options.
I was messing around with an $if statement but couldn't format it properly, so thanks for the help!

SimplePortal 1.0.0 RC1 © 2008-2021