I know that some of you had some problem with calcultation. There is a good answer to that with Keith message using the Expression element.
When I am using this element, I have a problem with the expression value as you can see below :
When the result of my expression is a decimal, the Value only take the numbers after the comma. It’s only work correctly when the result is an integer (when I rounded the result to 0).
I probably did something wrong, or misunderstood how this element is working.
Do you have any suggestions about this ?
As for what’s going on in your Expression, is its type set properly (it should be of type number obviously)? Are you sure of what your input values are? Etc., etc.
The screenshots I show above show how you can debug this, of course. But there’s no reason to so this calculation in Expression anyway, so… ?
Actually I broke down these two calculations because then I want to subtract the Expression min. to the Expression Max. (and maybe another calculation)
I could put these values in states, but I need to do it for 6 different inputs, so I didn’t want to put all the calculations in workflows, afraid of slowing down the page which is already running lots of workflows … doesn’t it ?
The type is set as this, decimal for the imput, number for the data, and number for the slider as show below.
I just don’t understant why the expression element return a value of 8 when it should return 12 ?
I followed your instruction with the text element and it’s working ! But when I enter the same expression in the Expression Element, I get the same problem as explain in the first place … problem with the value which is different from the expression result …