"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 [email protected].
For more options, visit https://groups.google.com/d/optout.