On Friday, November 17, 2017 at 3:53:02 PM UTC-5, Donald McClymont wrote:
>
> I don’t think you can set this but not sure why you would want to. 
>  However beware if testing the length of the field as I think if you only 
> have 1 item in the list then this is a string and you get the number of 
> chars in the string.  While if you have more than 1 you get the length of 
> the list.


Can you show some code demonstrating what you mean -- I cannot replicate? 
If you use the DAL to select data, it automatically converts the native 
data to a Python list, even if the list includes only a single item. So, if 
you do something like len(db.mytable(1).my_list_string_field), you should 
always get the length of the list, not the length of any single element in 
the list.

Anthony

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