sqlform grid search widget expression question

30 views
Skip to first unread message

Vlad

unread,
Jun 5, 2019, 6:56:56 PM6/5/19
to web2py-users
How can I search for None values? 

For example, the search expression
   table.customer == "1"
gives me records with customer equals 1. 
I can't figure out how to search for records with customer field equals None. 

Tried none,NONE, None, "none", etc. Nothing helped :)

Is it possible at all? 

Dave S

unread,
Jun 5, 2019, 10:44:40 PM6/5/19
to web2py-users

Some [pulldown] widgets have an explicit "No Selection" value.  But the default for the web2py string widget is a blank line.  Is the search widget like that, or does it require input?

/dps

Eliezer (Vlad) Tseytkin

unread,
Jun 5, 2019, 11:14:33 PM6/5/19
to web...@googlegroups.com
It's a reference field (foreign key) and the pull down has no empty value. It should have (because it can be null), but it doesn't for some reason. 

--
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 a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/HoU1SXZvqps/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/38f93fee-fbdf-4731-92b3-2dba557b512a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages