Skip to main content

I have a object that needs to be unique using a three-part key of ColumnA (int), ColumnB (DateTime), ColumnC (DateTime).  I understand that the row passed to FieldValidating and FieldUpdating do not contain actual row values, just the .NewValue for the field. 

I’d *like* to make the error occur on the last change to the row which causes the duplicate, but I’m not seeing a way to do this. 

What is the preferred way to do Multi-Field Cross-Row Validation?

I know about  ÂPXCheckUnique(Where = typeof(Where<EMPTimeSwipe.bAccountID, Equal<Current<EMPTimeSwipe.bAccountID>>, And<EMPTimeSwipe.swipeTime, Equal<Current<EMPTimeSwipe.swipeTime>>>>))]
 

The problem is a little more complex if the rule is that the swipeTime can’t be within 6 minutes of another swipe time for the same person on the same day.

 


Reply