Calculated Fields Form
[resolved] sum if .. (6 posts)

  1. oligou
    Posted 1 year ago #


    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


  2. oligou
    Posted 1 year ago #

    My apologies... plenty of topics resolving that

    @admin, please delete my topics

    sorry, tx

  3. oligou
    Posted 1 year ago #

    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 !

  4. codepeople
    Plugin Author

    Posted 1 year ago #


    The Calculated Field allows to insert complex equations using a javascript code as below:

    if(first condition) return first value;
    if(second condition) return second value;
    if(condition X) return value X;

  5. oligou
    Posted 1 year ago #

    thank you

    can you just put the first condition as example ?
    I don't know this code

    Thanks a lot :-)

  6. codepeople
    Plugin Author

    Posted 1 year ago #


    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:

    if(fieldname1 < 10){
    return fieldname1+10;
    }else if(fieldname1 < 100){
    return fieldname1+100;
    return fieldname1+1000;

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Calculated Fields Form
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.