Traditionally in other field types you could display a null value with an 
expression similar to the following:
db.table.datefield.represent = lambda value, row: A(value) if value else 
'unknown'

Occasional we have a requirement to display null values as alternatively 
i.e. None, Unknown, Not recorded, Not applicable etc ....
While it can be done with the above, as it stands, A(value) reverts any 
display formatting back to the default i.e. '%Y-%m-%d' rather than any 
other format that's been set as the default.

Are there any alternatives to this to retain default formatting i.e. 
'%d/%m/%y'?



-- 

--- 
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