Hello,
Is it possible to add a condition ?
THis condition will be an "IF", e.g. if the previous fields (list of 2 items) is A then do B+C, otherwise C+D
like in xl ...
Thank you
Hello,
Is it possible to add a condition ?
THis condition will be an "IF", e.g. if the previous fields (list of 2 items) is A then do B+C, otherwise C+D
like in xl ...
Thank you
My apologies... plenty of topics resolving that
@admin, please delete my topics
sorry, tx
I still have a question, how to put several if ?
E.G. a fieldnameY mention 1-2-3 or 4
If 1 : fieldnameX *80%
If 2 : FieldnameX *85%
If 3 : FieldnameX * 90%
If 4 : FieldnameX * 100 %
Any idea ?
THank you !
Hi,
The Calculated Field allows to insert complex equations using a javascript code as below:
(function(){
if(first condition) return first value;
if(second condition) return second value;
...
if(condition X) return value X;
})()
thank you
can you just put the first condition as example ?
I don't know this code
Thanks a lot :-)
Hi,
Please, I'll try to explain the code with an example:
Suppose your form contains the field "fieldname1" and you want add 10 to fieldname1 if its value is less than 10, if fieldname1 is less than 100 adds 100, and finally add 1000 to fieldname1 in other cases.
The equation that correspond to the previous situation is:
(function(){
if(fieldname1 < 10){
return fieldname1+10;
}else if(fieldname1 < 100){
return fieldname1+100;
}else{
return fieldname1+1000;
}
})()
This topic has been closed to new replies.