• Resolved anurag1288

    (@anurag1288)


    hi,

    I am trying to make a form where field1 contains annual salary of a person and field2 returns points based on salary range for example below:

    $100,000 and above – 50

    $97,500 to $99,999 – 38

    $95,000 to $97,499 – 37

    $92,500 to $94,999 – 36

    $90,000 to $92,499 – 35

    I am trying to do it with if statement but I don’t how can i do it, what code should I be using here?

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @anurag1288

    Thank you very much for using our plugin.

    In this case, you can use the “if” conditional statements in the equations as follows:

    Assuming the currency field is the fieldname1. Insert a calculated field in the equation and enter the equation:

    
    (function(){
    if(100000 <= fieldname1) return 50;
    
    if(97500 <= fieldname1) return 38;
    
    if(95000 <= fieldname1) return 37;
    
    if(92500 <= fieldname1) return 36;
    if(90000 <= fieldname1) return 35;
    return '';
    })()

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘need help with logical logical operator’ is closed to new replies.