• Resolved 0rbita

    (@0rbita)


    Hello,

    Is possible to display some message instead of the result of the calculation if the result is zero?

    Meaning:
    The field does have some calculation on formula builder.
    If the result is greater than 0, I want the result to shows.
    If the result is 0, I want a message to shows.

    I tried doing it with conditional logic but did not work.

    Is that possible?
    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author EDGARROJAS

    (@edgarrojas)

    It is, something like this should work:

    var result=<your formula>;
    if(result==0)
     return 'your message';

    return result;

    Regards!

    Thread Starter 0rbita

    (@0rbita)

    Hello again,

    So I wrote that:

    var result=<RNFRound($$field_rnField312$$+$$field_rnField311$$+$$field_rnField292$$+$$field_rnField296$$,2)>;
    if(result==0)
    return ‘verificar valores abaixo’;

    However, it is not ok.
    The system advice “unexpected token <”
    And if I took it off, it advice “unexpected token ;”

    Thank you

    Thread Starter 0rbita

    (@0rbita)

    Hello again,

    I took away the <> and it works.

    So I have another question, please…
    If I do not fill some field, it should show nothing on the email.
    What if I want it to display some message on the email?
    Is this possible?

    Thank you

    Plugin Author EDGARROJAS

    (@edgarrojas)

    Do you want to display a message on the email if a field is empty? The easier way would be to create another field with the formula that you want and use it inside your email. If you dont want to show that field to your users you could hide it with css.

    Regards!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Message instead of calculation’ is closed to new replies.