excuse me
don't understand?
what table is your Rec referring to?
in the 'Primary Key Field 2 No.' field of the change log is the field ID entered? what does your Rec.No refer to?
maybe the logic you are using is not quite right?
Anyway, to convert a code to an integer use the function
EVALUATE(varInteger,VarCode) function;
but in your case you can do a setfilte(yourfilterfield,'%1',rec.no);
DAniele