cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
thecarpe
Nintex Newbie

How to SUM semi-colon separated values in a single column returned from a lookup

Jump to solution

I have created a column that looks up from a list. It can return multiple checkbox values and one of the additionally included carry-over columns is numeric.  Context: Assembly A and Assembly N are selected. Their values from the 2016 part count column are 170 and 30 respectively.  The value placed in the primary column is "Assembly A; Assembly B". The additional carry over column has "170; 30". 

I would like to add the numbers separated by the semi-colon into a single calculated 200 value. I'm hoping that I can do this with an inline function. I've tried replace and I just can't seem to get the syntax right. Has anyone done anything similar and had luck with the inline function?  Essentially, it will store in a variable and populate a total part count column.  I just need some additional imaginations on this.  Thank you!

0 Kudos
Reply
3 Replies
soni_tumu
Nintex Newbie

Re: How to SUM semi-colon separated values in a single column returned from a lookup

Jump to solution

Hello Chris,

I tried your requirement on my site, and here are the steps:

Workflow Variables: ColResult (collection type), Result (Number type with default value 0), Sum (Number type with default value 0)

1) Use regular expression action to Split the data. Pattern is ; and Input is the SP column where your 170; 30 values were stored.

Store results in ColResult.

2) Foreach action to loop through the ColResult and store result in Result

3) Math operation to sum the values: ColResult and Sum; store the result in Sum variable

Once looping is completed, you will get the added value in the Sum variable.

View solution in original post

Reply
thecarpe
Nintex Newbie

Re: How to SUM semi-colon separated values in a single column returned from a lookup

Jump to solution

Worked perfectly! Thanks so much, Soni!

Reply
Not applicable

Re: How to SUM semi-colon separated values in a single column returned from a lookup

Jump to solution

Thanks for picking a correct answer, Chris Carpenter​, it's very helpful for the community.

Best!

Frank

Your community manager

0 Kudos
Reply