Field shows NAN

shaikkhasim
Tera Contributor

Hi Team

i have calculated the sum of subjects and i used to push out the total marks in the filed of total marks but in that filed instead of total marks it shows NAN error 

 

my script is as below 

if(newValue)
{
var t=parseInt(g_form.getValue('u_telugu'));
var h=parseInt(g_form.getValue('u_hindi'));
var e=parseInt(g_form.getValue('u_english'));
var m=parseInt(g_form.getValue('u_maths'));
var s=parseInt(g_form.getValue('u_social'));
var p=parseInt(g_form.getValue('u_physics'));
var sc=parseInt(g_form.getValue('u_science'));
var k=parseInt(t+h+e+m+s+p+sc);
g_form.setValue('u_total_marks',k);
}
}

khasim
1 ACCEPTED SOLUTION

Hemant Goldar
Mega Sage
Mega Sage

Hi @shaikkhasim ,

 

Looking at the screenshot provided. I think you have set the onChange field value = Hindi.
So you're getting a NaN error on Total Mark.

 

Make sure you set the Onchange field to Social.

 

I hope it will resolve your issue.

 

Regards,

Hemant 

**Please mark my answer correct or helpful based on the impact**

View solution in original post

7 REPLIES 7

HI Hemanth

set the on change field on social , now it is works.. thanks for your support 

khasim

Hi Hemanth

thanks for guiding , now my issues was resolved

khasim

shaikkhasim
Tera Contributor

You are awesome , thanks  you so much

khasim