Solved....
Thank you Antony, that was exactly right :)
The amazing thing is that i had imported all the database content (from 
access to sqlite), and all the code was working, making some math on that 
field without any problem.
Changed it to 'double', and it's now showing on the drop down list.

I just loved web2py and python  (so glad I moved to it)

many thanks Antony.

Le jeudi 23 février 2017 09:40:11 UTC-5, Anthony a écrit :
>
> "float" is not a valid field type -- it should be "double". See 
> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-types
> .
>
> Anthony
>
> On Thursday, February 23, 2017 at 8:27:36 AM UTC-5, Pierre wrote:
>>
>> Any hint on why only one field is missing in the search drop down 
>> smartgrid ?
>> Is there a way to find a "special" attribute about a field that would 
>> prevent it to be visible in the drop down list ?
>>
>> ps: I can search on this field (writing the query manualy )
>>
>> What I've tried so farwithout results
>>    # add "redefine = True" in the table creation
>>   #  specify readable and writable = True just before the grid = .........
>>   #  list all the fields in the smartgrid
>>   #  list of all  searchable fields in smartgrid
>>
>> The table: 
>>
>> db.define_table('achat',
>>           Field('quand'         ,'date'                      , 
>> label='Date'),
>>           Field('qui'              ,'reference qui'        , label='Qui' 
>> ),
>>           Field('typ'              ,'reference typ'        , 
>> label='Type'),
>>           Field('fam_id'       ,'reference fam'       , label='Fam'),
>>           Field('det_id'       ,'reference det'         , label='Det'),
>>           Field('montant'    ,'float'                         , 
>> label='Montant'),     # this is the field that is not showing in smartgrid 
>> automatic drop down list from smartgrid
>>           Field('famdet_id' ,'reference famdet'  , label='Famdet'),
>>           Field('commun'   ,'boolean'                  , label='Commun'),
>>           Field('cash'          ,'boolean'                  , 
>> label='Cash'),
>>           Field('dcc'            ,'boolean'                  , 
>> label='Payer ce mois'),
>>           Field('note'           ,'string'                      , 
>> label='Note',length=60))
>>
>>
>> The test controller:
>>
>> def t():   # this is a simple controler to test different solution
>>     grid = SQLFORM.smartgrid(db.achat)
>>     return dict(grid=grid)
>>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to