Have not tested this but it think something like adding the last line below...
{{for row in formListar:}} <tr> <td>{{=row.movies.title}}</td> <td>{{=row.movies.categories}}</td> <td>{{=len(row.movies.categories)}}</td> On Tuesday, 30 May 2017 02:38:01 UTC+1, Winter Kryz wrote: > > Hello everybody, > > I have a table like this > > Movie = db.define_table('movies', > Field('title','string', label = 'Title'), > Field('date_release','integer', label = 'Date Release'), > Field('duraction','integer', label = 'Duraction'), > Field('category','string','list:reference categories', label = 'Category'), > Field('actor','list:reference actors', label = 'Actor'), > Field('director','list:reference directors', label = 'Diretor'), > ) > > > on the views > <thead> > <tr> > <th>Title</th> > <th>Number of categories</th> > </tr> > <tbody> > {{for row in formListar:}} > <tr> > <td>{{=row.movies.title}}</td> > <td>{{=row.movies.categories}}</td> > > So, I would like to display the number of elements that the list:reference > categories has on it. > So for example: Category: 3 elements. > > There is a particular function to do that? > > Please, someone can help me I will appreciate that. > > Thanks :) > -- 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.