Forums

Full Version: Script to add conditional statements in calculated field
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How to write conditional statements in calculated field?

Add the script in calculated script area 

‘sdk.calculation.getDivision(Marks)’

Add the below script in connection script area. 

sdk.calculation = sdk.calculation || {}; 
sdk.calculation.getDivision = function(marks){ 
if(marks>=50) 
return 'Pass'; 
else if(marks<50) 
return 'Fail'; 
};