pmate, what you probably want is to show the codice (not the id) but the relation is still built on the id:
db.define_table('sanzioni', SQLField('violazioni_id',db.violazioni), SQLField('descrizione','text'), SQLField('sanzione',length=32), SQLField('note','text')) db.sanzioni.violazioni_id.requires=IS_IN_DB (db,'violazioni.id','violazioni.codice') You can name the field 'violazioni_codice' or something else but the value stored is the id of the violazioni. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---