• Resolved mordaskyt

    (@mordaskyt)


    You are so helpful and it is very appreciated. My form is 99% ready, I just need help with an AND operation. I have a field with the following:

    floor(fieldname12/600)AND(fieldname12>200,fieldname12<600,+1,+0)

    floor(fieldname12/600) is the primary value of this field. However if fieldname12’s value is between 200 and 600 i want the the resulting value to be 1, not 0. I set up and AND but I am not sure how to do the True and False results, which I have here as +1,+0.

    https://www.ads-software.com/plugins/calculated-fields-form/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mordaskyt

    (@mordaskyt)

    I am trying a different tack, this method will not give me the results I am looking for. If I need additional help I will let you know. Thank You

    Plugin Author codepeople

    (@codepeople)

    Hi,

    Your current equation is very confusing, but if the equation’s description is:

    With the value of fieldname12 field is between 200 and 600, the result would be 1, in other case the result would be fieldname12/600. The equation in this case would be:

    IF(200<fieldname12 && fieldname12<600, 1, fieldname12/600)

    another solution:

    (200<fieldname12 && fieldname12<600) ? 1 : fieldname12/600

    a third possibility:

    (function(){
    var v = fieldname12;
    if(200<v && v<600) return 1;
    return v/600;
    })()

    Best regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help with AND equation’ is closed to new replies.