That function was used in the example just because there was a bug with represent for referenced fields, I guess that bug is fixed and this function is now useless.
The case is that a SQLTable (which is the base of powerTable) was not showing format or representation, instead it was showing None or the referenced ID. I will make some tests to see if the reference bug is fixed. Em 27/02/2011, às 00:09, tomt <[email protected]> escreveu: > Hi, > > I was trying to learn more from the powertable example, specifically > how the represent options in the field definitions work. > > db.define_table('products', > > Field('category',db.category,label=T('CategoryW'),represent=lambda > c:get_category_name(c)), > > I deleted the get_category_name function definition to see what would > happen and I was surprised to see no difference, and no error was > generated. I don't understand this and I was wondering if there was > any explanation?

