If you can describe your constraint with as a DAL set, you can pass it to IS_NOT_IN_DB. Maybe something like this?
existing = db((db.page.number==request.vars.page)& (db.placement.code==request.vars.placement)) db.article.number.requires = IS_NOT_IN_DB(existing,'article.number') On Sep 22, 12:59 pm, Jason Brower <[email protected]> wrote: > I have three major fields in a table: > Page, Article and Placement > I want to make sure that the placement is unique to that article > so... > Page1, Article1, 1 > Page2, Article2, 1 > Page1, Article3, 2 > But it will not alow placement of... > Page1, Article4, 1 > or... > Page1, Article1, 3 > > I hope that makes sence. > Regards, > Jason Brower --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

