The labels are not stored in the db -- they are only used for constructing 
the form input. To get the labels, you can do:

db.person.title.requires.labels[query[0].title - 1]

But maybe you should just store the labels themselves rather than integers.

Anthony

On Tuesday, December 4, 2012 12:30:45 PM UTC-5, software.ted wrote:
>
> I have the following table: 
>
> db.define_table('person', Field('title', requires = 
> IS_IN_SET([('1','Mr'),('2','Mrs'),('3','Dr')]))) 
>
> when I perform a query of added row, i get the value 1 or 2 or 3 of 
> title instead of Mr or Mrs or Dr 
>
> query = db(db.person).select() 
>
> print query[0].title 
>
> 2 
>
> ...how do i get the labels displayed instead of the actual numerical 
> value? 
>
>
>
> -- 
> .......................................................................................
>  
>
> Teddy Lubasi Nyambe 
> Opensource Zambia 
> Lusaka, ZAMBIA 
>
> Cell: +260 97 7760473 
> website: http://www.opensource.org.zm 
>
> ~/ 
> Human Knowledge belongs to the world! - AntiTrust 
>
> Man is a tool-using animal. Without tools he is nothing, with tools he 
> is all - Thomas Carlyle 1795-1881 
>
> /~ 
>

-- 



Reply via email to