Hello @shaon007
You should simply to use the MIN operation.
MIN(X,Y,Z) returns the minimum value between X,Y, or Z (or any other parameter passed to the operation).
So, assuming the current equation is: fieldname1+fieldname2
Edit it as follows:
MIN(fieldname1+fieldname2, 8)
and that’s all.
Best regards.
Thanks for your reply.
This is my equation
IF(fieldname4<0.0,ROUND(fieldname4+(fieldname3/2)),ROUND(fieldname4-(fieldname3/2)))
How do I use MIN() here?
Hello @shaon007
MIN(8,IF(fieldname4<0,ROUND(fieldname4+fieldname3/2),ROUND(fieldname4-fieldname3/2)))
Best regards.
Another question sir..
If your lower limit is +1.5 but the result comes out +1.0 then, how I will make it +1.5
Hello @shaon007
In the same way you used the MIN operation, you should use the MAX one:
MAX(1.5, MIN(8,IF(fieldname4<0,ROUND(fieldname4+fieldname3/2),ROUND(fieldname4-fieldname3/2))))
Best regards.
That is working but we are still facing a problem.
Actually we are building a “sphere cylinder spectacle calculator”
we can divide the situation into 2 case:
case 1:
for negative number the limit is -6.0 to -1.5, so if the result is -7.0 then it will be -6.0 or if result is -1.0 then it will be -1.5
case 2:
for positive number the limit is +8.0 to +1.0, so if the result is +9.0 then it will be +8.0 or if result is +0.5 then it will be +1.0
This is the actual scenario.
Can you please help?
Hello,
In this case you should move the MIN and MAX operations into the IF operation:
IF(fieldname4<0,MIN(MAX(ROUND(fieldname4+fieldname3/2),-6),-1.5),MIN(MAX(ROUND(fieldname4-fieldname3/2), 1, 8)))
I’m sorry, but the support service does not cover the implementation of the users’ projects (forms or formulas). If you need additional support to implement your proejct’s formulas, you can contact me through my private website: Customization
Best regards.
Thanks sir for you quick reply and helping me. This will help me a lot.
If I need any further implementation I will definitely ask for customization.