• Resolved nodimurtimud

    (@nodimurtimud)


    Let’s suppose we have the formula “A” in a calculated field:
    ROUND(((fieldname4-fieldname3)/356)*(fieldname2*0.5))

    And then I have a second formula “B”, similar to the first, but which calculates a higher amount:
    ROUND(((fieldname4-fieldname3)/356)*(fieldname2*1.5))

    How can I display in a single row the following message to the user:

    Your result is “A” to “B”
    (where A and B are the results of the above 2 formulas)

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

    (@codepeople)

    Hello @nodimurtimud

    You can insert an “HTML Content” field in the form where displaying the result with a div tag as its content:

    <div class="result-here"></div>

    And then, you can implement everything from the same equation into a unique equation:

    (function(){
    var low = ROUND(((fieldname4-fieldname3)/356)*(fieldname2*0.5)),
        hight = ROUND(((fieldname4-fieldname3)/356)*(fieldname2*1.5)),
        result = CONCATENATE('Your result is ',low,' to ',hight);
    jQuery('.result-here').html(result);
    return result;
    })()

    Now, the other two calculated fields become unnecessary, and this can be configured as hidden by ticking a checkbox in its settings.

    Best regards.

    Thread Starter nodimurtimud

    (@nodimurtimud)

    Thanks! That was very helpful!

    • This reply was modified 3 years, 9 months ago by nodimurtimud.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to display a range’ is closed to new replies.