Did you try the following (with "and" in lowercase) ?

if vinyl.field1 and vinyl.field2:
    msg="yes the both have values"
else:
    msg="no they don't"


Le mardi 1 octobre 2013 05:40:25 UTC+2, davedigerati a écrit :
>
> I'm checking a record to see if two fields returned with values, or are 
> nulls, and I can successfully check
>
> if vinyl.field1:
>     msg="yes it has a value"
> else:
>     msg="no it does not"
>
> but I can not figure out how to check two fields via compound IF:
>
> if vinyl.field1 AND vinyl.field2:
>     msg="yes the both have values"
> else:
>     msg="no they don't"
>
> Can anyone please correct my poor python?
> Thx
>
>

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

Reply via email to