Re: [web2py] If statement in View not processing correctly

2016-04-08 Thread Richard Vézina
{{if customer.address2:}}
Apt/Suite: {{=customer.address2}}
{{else:}}
Apt/Suite:
{{pass}}

On Fri, Apr 8, 2016 at 3:44 PM, Jeff Riley  wrote:

> Hello all.  I have the following if statement in my views to try to
> eliminate empty fields that are displaying "None" in my views.  I am not
> sure how to get the field value to evaluate the statement.  Any help
> appreciated.
>
> {{if customer.address2 == "None":}}
> Apt/Suite:
> {{else:}}
> Apt/Suite: {{=customer.address2}}
> {{pass}}
>
> --
> 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/d/optout.
>

-- 
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/d/optout.


[web2py] If statement in View not processing correctly

2016-04-08 Thread Jeff Riley
Hello all.  I have the following if statement in my views to try to 
eliminate empty fields that are displaying "None" in my views.  I am not 
sure how to get the field value to evaluate the statement.  Any help 
appreciated.

{{if customer.address2 == "None":}}
Apt/Suite:
{{else:}}
Apt/Suite: {{=customer.address2}}
{{pass}}

-- 
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/d/optout.