Reg Form

Hai All,

I am having fields like Itemid, Physicaldate, Reversed in the form. when I select Reversed is true

then Itemid can be duplicted. And when Reversed is N****o then it should not be duplicated. Can any one give the idea where and how to do.



If you can have max 1 reverse record, it would be possible to have a unique index [ItemId, PhysicalDate, Reversed] (I expect PhysicalDate shoudl be part of the index) - in that case, you would be allowed to create just one record with Reversed=false and possibly another record with Reversed=true, but not two records with the same value of Reversed.

If you need more reverse records or another more complex logic, you have to implement it in validateWrite() - e.g. if Reversed is false, try to find a record with same ItemId, PhysicalDate and Reversed and return false if you find some.