View Single Post
Old 03-23-2013, 10:17 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,131
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Philantrop View Post
I have a custom column "foo" of type "Long text, like comments, not shown in the tag browser" which either contains nothing at all or some text.

I'd like to have a simple "Yes/No" column "bar" that, in the library view, shows if "foo" contains anything.

So I added said "Yes/No" column of type "Column built from other columns" and used this template:

program: test(select(field('#annotations'),'.*'),'Yes ','No')

Unfortunately, this function always returns "No". Even when replacing the '.*' with 'e' (because I had prepared "foo"'s content to contain it), it still returned "No".

I've experimented with just using test() but whatever I tried, it simply either returned "Yes" or "No" for *all* entries, regardless of "foo"'s actual content.

Can someone please lend me a hand here?
Have you tried to flip the logic (Not an empty string. those are 2 ' not a double quote)?
Code:
program: test(select(field('#annotations'),''),'No','Yes')
theducks is offline   Reply With Quote