I think you should create your on validator. This seems a very specific problem.
Massimo On Dec 2, 9:26 am, Fran <[EMAIL PROTECTED]> wrote: > Thanks Jonathan. > > What I want: > gis_key.service should be from the following SET: > google,multimap,yahoo > There should only be a maximum of 1 gis_key.key for each of these > services. > I therefore need more than just IS_IN_SET() as that allows multiple > keys per service. > > options=[x for x in ['google','multimap','yahoo'] if not db > (db.gis_key.sevice==x).count()] > > This works well when adding a new key as I get all 3 options visible > in a dropdown unless I have an entry already, in which case I just get > the remaining two. > However it doesn't work when editing an existing entry (via t2.update) > since I still just get only entries available to me which are not yet > set in the database, when the usual result desired would be to change > just the key, but leave the service as-is. > > I could look into solutions which have only part of the validation > done in the Model (either the IS_IN_SET or the IS_NOT_IN_DB) & do the > rest in a mixture of the Controller & the View, but this would > obviously mean a lot more work... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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 -~----------~----~----~----~------~----~------~--~---

