View Single Post
Old 09-04-2016, 05:18 PM   #1
foobarius
Junior Member
foobarius began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2016
Device: Tolino Shine 3 HD
Custom column GPM

Hey,

I'm trying to create a column called Collection but I'm failing.

Code:
program:
    library_name = current_library_name();
    rating = field('rating');
    read_state = field('#read');
    if read_state != "Read":
        output = "{0}: {1} Stars".format(library_name, rating);
    else:
        output = "{0}: {1}".format(library_name, read_state);
    return output;
Where the #read column is a multiple-choice column with values such as "Read" or "In Progress" or "DNF"

This template doesn't compile, even though I don't see no reason why it wouldn't.

I'm not a Python programmer but this seems to me absolutely fine.

Thanks in advance.
foobarius is offline   Reply With Quote