sorry, I over simplified. I'd like to handle more than two conditionals. 
For example, based on another field's value, I would like a different 
message to appear.  

So with two conditionals, syntax does work. Seel yellow

connection_canceling_links =  [dict(header='Cancel connection', 
 body=lambda row: A('Withdraw my invitation', 
_href=URL('delete_connection_request_i_sent', args=row.auth_membership.id, 
vars=dict(person_first_name=row.auth_user.first_name, 
person_last_name=row.auth_user.last_name, 
person_user_id=row.auth_user.id)), _class='btn') if 
row.auth_membership.is_active else DIV('Historical data', 
_style='color:DarkGray'))]

But how to add another IF statement as in below (which raises syntax 
error).  See orange IF added to the already-working yellow ones

connection_canceling_links =  [dict(header='Cancel connection', 
 body=lambda row: A('Withdraw my invitation', 
_href=URL('delete_connection_request_i_sent', args=row.auth_membership.id, 
vars=dict(person_first_name=row.auth_user.first_name, 
person_last_name=row.auth_user.last_name, 
person_user_id=row.auth_user.id)), _class='btn') if 
row.auth_membership.is_active DIV('Testing data', _style='color:Orange') if 
row.auth_membership.status = '10' else DIV('Historical data', 
_style='color:DarkGray'))]

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to