View Single Post
Old 02-06-2023, 08:23 PM   #503
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,522
Karma: 8065528
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Also, another question related to column icons. In an advanced rule, what is the most correct way to return no icon?

Example: My 'Cleanup' VL also searches for marked:true books.

Code:
program:

first_non_empty(
 [lots of entries for specific metadata issues]

## Fallback
	if is_marked() then ' ' fi,
	if 'Cleanup' inlist virtual_libraries() then 'polish.png' fi
)
If I use '' (no space), it returns 'polish.png' for marked books. Hence the whitespace.
Also, switch_if() doesn't have this problem. When the if part is true, the value is returned even if it is empty.
chaley is offline   Reply With Quote