Post

2 followers Follow
0
Avatar

Summing Calculation fields from multiple app

 I seem to be having trouble summing values across multiple apps. The result that I get in a concantenation of values instead of the sum. Can anyone assist. I have include a few screen shots

 

Mike Omene

Please sign in to leave a comment.

1 comment

0
Avatar

Hi Mike,

you get that result cause you make Number(price[i]) a string (text) by adding .toFixed(2) - .toFixed() parses a number to text, and text you can't calculate. 

Create a new calculation field, copy your code without .toFixed(2). Also || 0 must be outside the parenthesis:

number = Number(price[i]) || 0;
sum += number
};
sum.toFixed(2)

Rainer

Rainer Grabowski 0 votes