Hi All
We have created a new field on Vendor card which is an integer field. The default value of the field is 0. Now we have a duplicate validation on this field and it works fine except that we don't want to trigger the validation if the field value is 0, which is the default for an integer field.
Code Sample:
Vendor.SetCurrentKey(MY_ID);
Vendor.SetFilter(MY_ID, '<>%1', 0);//not working
Vendor.SetRange(MY_ID, Rec.MY_ID);
if Vendor.FindFirst() then
Error('Duplicate ID %1 Name %2', Vendor.MY_ID, Vendor.Name);