• Resolved Francis

    (@emolotel)


    Can a calculated datum perform two operations on the same form?

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

    (@codepeople)

    Hello @emolotel

    I’m sorry, I don’t understand your question. If you are referring to the number of calculated fields in the form, the answer is yes, you can insert multiple calculated fields in a same form.

    Best regards.

    Thread Starter Francis

    (@emolotel)

    I said that badly. And I apologize. I wanted to have two mathematical expressions from a calculated field.
    Example:

    (fieldname1 / fieldname2) Text
    (fieldname4 * fieldname5)
    All this within a calculated field

    • This reply was modified 5 years ago by Francis.
    Plugin Author codepeople

    (@codepeople)

    Hello @emolotel

    The equation should return one result, you can decide the operation to apply based on a condition, using the IF operation, or the if conditional statement of javascript (please, do not confuse them)

    I’ll try to describe the process with a hypothetical example:

    – assuming your form include a radio button field (fieldname3) with two choices whose values are: 1 and 2 respectively,
    – and you want evaluate the operation: (fieldname1 / fieldname2) if the value of the fieldname3 field is 1
    – and the operation: (fieldname4 * fieldname5) if the value of the fieldname3 field is 2

    In this hypothetical case the equation would be:

    
    IF(fieldname3==1, fieldname1 / fieldname2, fieldname4 * fieldname5)
    

    and that’s all.
    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Operated calculated’ is closed to new replies.