Hey everyone!

I was trying some of the math functions in the workflow calculated fields.

I figured that it works quite well with just 2 parameters; however with multiple parameters it gets a bit…difficult

Basically what I´m trying to achieve is to calculate the average value of 6 parameters in total, while 4 of the 6 parameters are being multiplicated with the factor 2. The remaining two parameters don´t get multiplied.

Therefore:

P0 → counts twice

P1 → counts twice

P2 → counts twice

P3 → counts twice

P4 → counts as one

P5 → counts as one

Mathematically put:

{(P0*2)+(P1*2)+(P2*2)+(P3*2)+(P4*1)+(P5*1)} / 10 = Average value

Now, unfortunately the “add” function only supports two parameters; therefore I had to create multiple add-calculations; in the end my attempt looks kind of like this:

{divide({add({add({add({multiply({P0};2)};{multiply({P1};2)})};{multiply({P2};2)};{multiply({P3};2)})};{P4};{P5})};10;)}

I think that the code should be right, but for some reason I keep getting very strange (and wrong) results…

Has anybody made some (positive or negative) experiences regarding the multiple use of mathematical operators in the Workflow module?

Any help would be appreciated!

Thanks and all the best

Rick