• Resolved tosh11formula

    (@tosh11formula)


    Hello

    Hi It is possible to have a default value in “Calculated fields” if the value is invalid instead of 0 value?

    Filedname8: PREC(fieldname2*fieldname6*fieldname7/1000000,2)
    Example Result: X.XX

    I have to 2 Decimal value in the end, some of the user put lowest value but the result if showing 0 value

    and for final Result
    Fieldname9: ROUND(fieldname8*9500,true)
    – We Want to Default Value example 9,500 instead of 0 in this field.

    is this possible?

    • This topic was modified 2 years, 10 months ago by tosh11formula.

    The page I need help with: [log in to see the link]

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

    (@codepeople)

    Hello @tosh11formula

    Yes, that’s possible.

    Assuming you want to check if fieldname8 is different from zero before evaluating the mathematical operation (fieldname8*9500) and display 9500 otherwise.

    In this case, you need a conditional operation as follows:

    ROUND(IF(fieldname8, fieldname8*9500, 9500))

    Best regards.

    Thread Starter tosh11formula

    (@tosh11formula)

    Thank you on this,

    Anyway, it is also possible the value on Fields is 3 characters only,

    for example: allowed for field is max 999, they not allowed to input more characters, is this also possible?

    Plugin Author codepeople

    (@codepeople)

    Hello @tosh11formula

    You can enter the 999 through the max attribute in the field’s settings. The plugin will allow users to type larger numbers, but it will display a validation error.

    In the equation that uses the field you can use conditional operations to not evaluate it if the operands values are incorrect.

    Ex.

    IF(AND(fieldname2<=999, fieldname6<=999, fieldname7<=999),PREC(fieldname2*fieldname6*fieldname7/1000000, 2), '')

    Best regards.

    Thread Starter tosh11formula

    (@tosh11formula)

    Great, Thank you for your help

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

The topic ‘Default Value Calculated fields’ is closed to new replies.