Addition to code

HI guys, how do i add two code type variables or how do i add decimal value to code type field. is there any way i can convert the integer type variable or value to code and add it to code type field. Hemang Naik Senior Software Engineer

Take a look at the EVALUATE function in the online help, this should do the trick for you. E.g.


myDecimalValue: Decimal
myCodeValue: Code

myCodeValue := '99999';
IF NOT EVALUATE(myDecimalValue,myCodeValue) THEN
  myDecimalValue := 0;

note the return value is optional to use, but will result in a runtime error if conversion fails. /Soren