1

Hi guys, Anyone know how to put condition “±” in microflow decision? The answer should be in ± 20. For example, I input data 1000, the standard deviation range should be 980 – 1020. If it over or lower than the value, it will triggered popup message.

asked

Muhammad Ikhwan Afiq bin Azmir

4 answers

1

Hi Mohammad ,

Perform arithmetic operation in your microflow before checking the deviation.

Like the value you are going to give is 1000. Consider this value as InputParameter to your microflow.

Create two integer variables in your microflow and perform addition and subtraction in each integer respectively.

LeastRangeValue – 1 integer variable should be like $InputParameter – 20

GreatestRangeValue – Other one should be $InputParameter + 20

Your decision condition should be like

$variableName >= $LeastRangeValue and $variableName < $GreatestRangeValue

answered

Steffy D

1

Beside the point of your question, which is now answered by Steffy already, but as response to Ronald: Getting the standard deviation can be done using 'Math function’:

answered

Tim v Steenbergen

0

In Mendix you need to calculate the standard deviation yourself. You could try to create a Java action for this. See stackoverflow: https://stackoverflow.com/questions/1735870/simple-statistics-java-packages-for-calculating-mean-standard-deviation-etc

Regards,

Ronald

answered

Ronald Catersels

0

Hi Muhammad,

You can write an expression inside of a decision, where

$variableName >= 980 and $variableName <1020

Of course you need to replace $variableName with the variable you want to evaluate.

answered

Nataliya van der Hoeven