db1 { field1 } db2 { field2 } db3 { field3 } db1.field1.requires = IS_IN_DB ( db2.field2 or db3.field3 )
what is the syntax for above IS_IN_DB statement ( is it possible to add drop down menu also for this command ) ? On Sat, Aug 22, 2009 at 8:20 AM, Iceberg <iceb...@21cn.com> wrote: > > On Aug21, 7:58pm, newbie_web2py <varunk.ap...@gmail.com> wrote: > > db.table_name.field1.requires= IS_IN_DB(db,'table_name.field2_name','% > > (name)s') > > > > Can we extend the above syntax so that we can select field1 from > > field2 or field3 ( with or without the drop-down menu ) ?? > > Don't know whether you mean this: > > db.table_name.field1.requires= IS_IN_DB( > db,'table_name.field2_name','%(field2)s, %(field3)s') > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---