Skip to Content
Former Member
May 12, 2016 at 04:41 PM

Summing based on column value


I am trying to total a column, ITQTY#. The thing is, if it's a negative value, they store this negative symbol in another column - ITQOHA.

The below is not compiling, 'The remaining text does not appear to be part of the formula' We have to code so that we don't subtract a negative from a negative which would yield a positive. What is not correct here?


shared numbervar aaa

if {ICDET1.ITQOHA} = ' ' aaa = aaa - {ICDET1.ITQTY#}


aaa = aaa + {ICDET1.ITQTY#}