I have a form, with a field that is calculated during registration / entry. This is done with Rules for field definition >> set expression
Total=([entry.qty]*[entry.value]/100)
And I need the result to be rounded to 2 decimals. But I do not get this to work. I am wondering where I have to set the rounding, and how. As far as I understood, the rounding can be used in form field macros. If I apply this to the form field macro in registration control, this does not work ... help appreciated :)
Have a look at the math operations supported by ConfiForms in expressions - https://wiki.vertuna.com/display/CONFIFORMS/Supported+math+operators%2C+formulas+and+functions
hint: ROUND is also supported
I have seen that @Alex Medved _ConfiForms_ but still cannot get it to work. I tried to apply this to the form field macro in registrations control, in which the expression is set by rules for field definition.
ROUND(fieldname,2)
Or do I need to add this to the formula in Rules for field Definition which does the calculation and sets the expression?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure what is this what you have...
ROUND(fieldname,2)
but the formula to ROUND will be something like
Total=(ROUND([entry.qty]*[entry.value]/100, 2))
or
Total=(SCALE([entry.qty]*[entry.value]/100, 2))
depends what you need exactly with the value you have calculated
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Alex Medved _ConfiForms_ - the last one for the Formula did it. (y)
I tried that before but had it like which did not do the trick
Total=(ROUND([entry.qty]*[entry.value]/100), 2)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, not really sure I understand your comment... Could you please rephrase it? Something still does not work for you?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.