View Single Post
Old 03-20-2021, 02:35 AM   #1
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,063
Karma: 75568269
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Template: Strcat matching

Currently, I have a column icon template like this:

Code:
program: 
   f = field('#taglike');
  strcat
   (    contains(f, "^foobar|foo bar$", 'foobar.png:', ''), 
    contains(f, "foo", 'foo.png:', ''), 
    contains(f, "bar", 'bar.png:', ''), 
    contains(f, "test", 'test.png:', ''), 
   )
It shows icons for whatever values are in the column, e.g. "foo, test"returns "foo.png:test.png"

However, how would I display an icon if the values do not match any existing ones? e.g.:

Value: Unknown
Results: Unknown.png

Value: Unknown, Undefined
Results: Unknown.png

Value: Unknown, foobar
Results: foobar.png

ownedbycats is offline   Reply With Quote