We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Calculate Sum of Integer Values into Column

Brian S1
Mega Contributor

Hi Everyone,

I am attempting to calculate a 'Total Score' column with the sum of 10 integer fields. I have tried creating a business rule to calculate the value, however, the below code is not working. 

find_real_file.png

find_real_file.png

 

Can someone take a look to see what I am missing? Any help would be greatly appreciated.

Thank you,

Brian

1 ACCEPTED SOLUTION

try

var k = ((a + b  + c + d + e + f + g + h + i + j)/10).tofixed(2);

View solution in original post

5 REPLIES 5

vkachineni
Mega Sage

var a = parseInt(current.fieldname)==NaN?0:parseInt(current.fieldname); //return a zero if not a number

//rest of them

var k = a + b  + c

Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Vinod Kumar Kachineni
Community Rising Star 2022