Problem with JS in calculated field
-
Hello,
i have added the following code in the calculated field.
But only “operation 1” and “operation 2” are working fine. When i delete “operation 1” and “operation 2” then “operation 3” and “operation 4” are working fine. Where is the problem?(function(){
/*operation 1*/
if(fieldname18 > fieldname19) return PREC(fieldname19/fieldname18,2);
if(fieldname18 < fieldname19) return PREC(fieldname19/fieldname18,2);
/*operation 2*/
if(fieldname17 > fieldname20) return PREC(fieldname20/fieldname17,2);
if(fieldname17 < fieldname20) return PREC(fieldname20/fieldname17,2);
/*operation 3*/
if(fieldname18 > fieldname20) return PREC(fieldname20/fieldname18,2);
if(fieldname18 < fieldname20) return PREC(fieldname20/fieldname18,2);
/*operation 4*/
if(fieldname17 > fieldname19) return PREC(fieldname19/fieldname17,2);
if(fieldname17 < fieldname19) return PREC(fieldname19/fieldname17,2);
})();
- The topic ‘Problem with JS in calculated field’ is closed to new replies.