Thanks to Anthony for correcting my virtual field definition from geo.ad1.vname=Field.Virtual(lambda r: "%s, %s" % (r.name, geo.country(r.id_un).iso3_0)) to: geo.ad1.vname=Field.Virtual(lambda r: "%s, %s" % (r.ad1.name, geo.country(r.ad1.id_un).iso3_0)) #table name specified
However, it seems that virtual fields don't work with the autocomplete widget and i get a keyerror 'vname'. db.address.state.widget=SQLFORM.widgets.autocomplete(request, geo.ad2.vname, limitby=(0,10), min_length=2) Perhaps it's only my mistake, but could someone confirm that autocomplete don't work with virtual fields ?

