• Resolved sagarchataut

    (@sagarchataut)


    I need a help, I’m trying to get a solution for this;
    Suppose I have obtained a result <1 for a calculation, then I have to proceed my 4-5 steps of calculations and display that result only.
    And similarly, if I got value ≥1, then again I’ve to use different formulas and different steps to show the result obtained in this case only.
    So, is it possible to show one set of calculations and result only.
    Case is:
    If M<P, then it will have different steps to be performed, other than when having P>M. And only the true case solutions has to be displayed.

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @sagarchataut

    To display some fields in the form based on the equation’s results, you can define dependencies between these fields and the equations from the settings of the calculated field. More information about dependencies by reading the following blog post:

    https://cff.dwbooster.com/blog/2020/03/01/dependencies

    But if you want to evaluate some operations based on fields’ values, you should use conditional statements or conditional operations in the equation. For example, assuming you have the sum fieldname1+fieldname2, and you want to increase the result by 10% if the sum is greater than 10, or 20% percent if not. The equation can be implemented as follows:

    
    (function(){
    var result = fieldname1+fieldname2;
    
    if(result <= 10) result = result*1.20;
    else result = result*1.10;
    
    return result;
    })()
    

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Conditional Solutions’ is closed to new replies.