Hi All,
I have a method that gets the subtotal of the fields into abc_Total field. However, I like to have a condition such as if any of the fields is left null then no subtotal should get inserted into abc_total field.
The method name is called abc_Total
var result = Math.abs (abc_hyperactivity + abc_inappropriate_speech + abc_irritability + abc_lethargy + abc_stereotypy)
if (abc_hyperactivity != "null" && abc_inappropriate_speech != "null" && abc_irritability != "null" && abc_lethargy != "null" && abc_stereotypy != "null" && abc_hyperactivity != "null")
{
abc_total = "null"
}
else abc_total = result
Some how the above method inserts the total into abc_Total regardless of any null fields.
Any suggestion how to make this work.
Thanks in advance,
Abrahim