Summing Fields

Posted by qcace on 06-Nov-2009 11:01

I need help with the syntax below:

ASSIGN fil-total:SCREEN-VALUE = fil-field1:SCREEN-VALUE + fil-field2:SCREEN-VALUE.

All fields are integers, but I get an error saying it cannot display fil-total?

Thanks.

All Replies

Posted by qcace on 06-Nov-2009 11:55

Using input-value seems to work, (not sure if it's the best way):

ASSIGN fil-total:SCREEN-VALUE = STRING(fil-field1:INPUT-VALUE + fil-field2:INPUT-VALUE).

Posted by Admin on 06-Nov-2009 12:01

Using input-value seems to work, (not sure if it's the best way):

It is! Screen-Value returns character, so you'd have a string addition, not the numeric addition.

This thread is closed