I have the following validator:

IS_NOT_IN_DB(db(db.PromoUnit.sequenceNumber==request.vars.sequenceNumber),db.PromoUnit.promoPositionID,error_message='combination
 
promo position sequence number already in database')

The table PromoUnit also has a field nodeID which I would like to include 
in the validator. I thought maybe this would work:

IS_NOT_IN_DB(db((db.PromoUnit.sequenceNumber==request.vars.sequenceNumber)&(db.PromoUnit.promoPositionID==request.vars.promoPositionID)),db.PromoUnit.nodeID,error_message='combination
 
nodeID promo position sequence number already in database')

... but it doesn't. Is there a solution to solve this problem?


Annet.

-- 



Reply via email to