Avatar

Level 10

Did you place the script in the Calculate event of the NumericField? Did you select the FormCalc as the language?

There was a minor mistake from my code in the highlighted portion.. I do not need ".value" to get the value of the variable. Please try the below corrected code..

var count = field1.rawValue;

if(count == null) then
    count = 0;
endif


var price = field2.rawValue;
if(price == null) then
    price = 0;
endif

if(count ne 0) then
   $.rawValue = count * price;
else
  $.rawValue =0;
endif

If you still have issues, send me the file to LiveCycle9@gmail.com so I can have a look at it.. Please mention where the issue is..

Thanks

Srini