Skip to main content

 

In a K2 workflow step, in  update list item I am trying to do Sum like Total Sum = Total Sum + Test Number

 

I am trying to leverage Inline functions => Mathematical => Sum(Values)

 

 

If I add 2 columns like Sum(Total Sum , Test Number,) OR Sum(Total Sum + Test Number) when workflow runs it is failing at this step.Please refer the attached screenshots for details.

 

 

What is the correct step?


15089i09D88ECB4771FA48.png
11323i27136E9D1F362753.png
13139i26EBC681E5D1438C.png
16297i0E7D3658A83E3544.png
11649i4DDD04A40ABE4633.png
14688i51B6DE33400559C7.png

The input of the Sum function expects an array for numbers such as a column from a SmartObject List Method. It would one column of the properties. I don't have designer up at the moment, but what you might try is { value, value }    This is how to define it in C# if you wanted to explictily define an array. I am not certain that will work since that is probably more a function of the complier. The only other thing that comes to mind is you could create a qucik inline Function to create arrays for you from values which you could then pass to the Sum. 

 

Now, if you are only wanting to add those two values instead of suming an unknown number of values, you could just use and expression and say Value1 + Value2. This example is in K2 Studio, but is doable in Designer as well.

 

13072iD27942DCC7D65B8D.png


Hi Scott,

 

Thanks for the tips. I used Expressions under Inline functions and accomplished the requirement. Thanks again for the help.


Reply