is it possible to have an if statement of some sort in Dal to validate/add 
a value based on other field?

like:

db.define_table('product',
    Field('series', 'reference series'),
    Field('suppliercode','reference supplier'),
    Field('description'),
    Field('tiluse','reference tileuse'),
    Field('price'),
    Field('cost'),
    Field('picture', 'upload'),
    Field('conversiontype','reference conversiontype',default=2))



I need the conversiontype to be 1 if tiluse = '5' otherwise stay in 2.  How 
can I accomplish this in Dal?

thanks

-- 

--- 
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/groups/opt_out.

Reply via email to