Check a value before saving but not during update

Dear all,

When I scan a barcode (which is an order number), I want to check if this order number already exists in my datas. If it is the case, I forbid the creation of the record and I trigger an error with this following code :

NOT(IN([_THIS], SELECT(ORDRES[NO_ORDRE], [NO_ORDRE] <> [_THISROW].[NO_ORDRE])))

This works perfectly when I create the record.

However, when I edit the record, because people can insert comments afterwards, I cannot save because the order number is already existing...

Any idea about this trouble ?

Thanks for your help.

Kim

 

 

0 2 128
2 REPLIES 2
Top Labels in this Space