Quantcast
Channel: MobileRead Forums
Viewing all articles
Browse latest Browse all 50094

Problem programming a custom Column

$
0
0
I've been using this program for a column for ages:


program:
first_non_empty(
str_in_list(field('tags'),",", "_List.Active", "Active", ""),
str_in_list(field('tags'),",", "_List.Collections","Collections", ""),
str_in_list(field('tags'),",","_List.Favorites", "Favorites","")
)

I recently upgraded from. few version ago, and now for the columns that don't match any of the options above I get an error that says:

TEMPLATE ERROR expected string or bytes-like object.

If I change it to:

program:
first_non_empty(
str_in_list(field('tags'),",", "_List.Active", "Active", ""),
str_in_list(field('tags'),",", "_List.Collections","Collections", ""),
str_in_list(field('tags'),",","_List.Favorites", "Favorites",""),
"Z"
)

It work as before, except that now I have a non-empty value where I don't want it.

Is there some rules where custom columns can't be empty any more? Is there an option I need to set to allow this?

Any help would be appreciated. Thanks.

Viewing all articles
Browse latest Browse all 50094

Latest Images

Trending Articles



Latest Images