http://groups.google.com/group/web2py/browse_thread/thread/cd5c13eb8dcb8459#
On Sep 2, 10:52 am, Benigno <bca...@albendas.com> wrote: > I figure he means something like: > Imagine you have several companies working with your applicacion, and > you have a table with fields like: > - Company > - Name > - ... > > Normally you would want to make Name unique, but in this case you > probably want to make the combination of Company and Name Unique, so > that a name is unique within each company. > > This is something I have also been struggling with, and so far the > only solution I have found is making a hidden field the combination of > the two, but maybe there is a better way to do this. (This example is > with IS_NOT_IN_DB but I'd guess the solution would be the same for > IS_IN_DB). > > Tititi, sorry if I have missinterpreted what you wanted to say. > > Benigno. > > On Sep 2, 5:25 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > What do you mean to be validated in this case, can you provide an > > example? > > > On Sep 2, 8:56 am, tititi <briant...@gmail.com> wrote: > > > > Hi everyone, > > > > I'm trying to keep the duplicate insert logic at the model level and > > > would like to find out if there is a way to do this. For example, I > > > would like a USER_ID and GROUP_ID to be validated before an insert can > > > be committed. Using IS_IN_DB with 2 fields work? If there isn't > > > support for it, is there a chance to add this feature in? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---