Hello @319sayed
Thank you very much for using our plugin. The plugin includes multiple alternatives for conditional statements.
You can use the IF operation, if conditional statement of javascript, and javascript ternary operator.
For example, assuming you have the operation fieldname1+fieldname2, and you want to return the result, “low” if the sum is less than 3, “medium” between 3 and 7, and “high” over 7. In this hypothetical case, the equation could be implemented as follows:
Using nested IF operations:
IF(fieldname1+fieldname2<=3, 'Low', IF(fieldname1+fieldname2<7, 'Medium', 'High'));
Implementing the same equation, but using the if conditional statement and function structure:
(function(){
var v = fieldname1+fieldname2;
if(v<=3) return 'Low';
if(v<=7) return 'Medium';
return 'High';
})()
A third alternative by using the javascript ternary operator:
(fieldname1+fieldname2<=3) ? 'Low' : ((fieldname1+fieldname2<7) ? 'Medium' : 'High'));
All these equations are equivalent.
Best regards.