On Monday, August 3, 2015 at 9:00:45 PM UTC-7, reddyreddy wrote:
>
> But, how can I access it. 
>
> Tablename.myfield is giving None.
>
>
>
How are you populating your table?  Appadmin, importing a csv, importing 
into the database using it's import tools, or just filling out a (web2py) 
form for each entry?  This may be a factor in your results (as would not 
having any records).

BTW, I think Anthony let the field default to type string, so if you have a 
valid value in your database, you'd use a .contains() to match it
(see 
<URL:http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#like--ilike--regexp--startswith--endswith--contains--upper--lower>),
although the case operator may also be useful
<URL:http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#case-case>

/dps


 

> On Aug 3, 2015 10:32 PM, "Anthony" <[email protected] <javascript:>> 
> wrote:
>
>> Field('myfield', requires=IS_IN_SET(['Yes', 'No']))
>>
>>
>> On Monday, August 3, 2015 at 9:52:32 PM UTC-4, reddyreddy wrote:
>>>
>>> Hello all,
>>>
>>> I want to create a dropdown field in database with 'yes' and 'no' 
>>> options.
>>> Can any one pleaseee let me know how can I do this.
>>>
>>>
>>> Chaitanya
>>>
>>> -- 
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to