kallejar
Nintex Newbie

How to loop values and store found values to one variable

Jump to solution

Hi all,

 

it seems that I cannot do following simple thing. Or at least it feels that it should be simple. what I need to do is:

 

Get values from list item. And the field where I get values is managed metadata field with multiple values. This works just fine and I get the values out of it. Lets say that values are "12345;54321".

 

Then I store those values to collection-variable and  add for each "loop". In the for each I would need to query the hidden taxonymy list againsist these values. From hidden taxonymy list I query the "path" (really I just need part of the path value and I do regex cleanup for it) field and I do get the correct value, but here comes then the problem.

 

As I do have two or more values that I need to loop, I manage to get only the last value from the loop which I can then store to the current item text field.

 

So what I need is to get both of those values in the field. I have been tryin to store the "path"-value in all possible variables without success. If some one have done similar it would be much appreciated.

 

1. get multiple (e.g 2 values "12345;54321") values from current item managed metadata

2. query those values in for earch against hidden taxonomy list and get "path"-values

3. Store all 2 values found to current item text field as I single text string.

Reply
1 Reply
kallejar
Nintex Newbie

Re: How to loop values and store found values to one variable

Jump to solution

ok, it is nice to be able to aswer to your own question

So here is how I managed to do what I needed to get done.

 

I added in the foreach two Collection Operations. The first I added count the the amount of items in Collection variable (CollMatateriaDescription) and that I stored to as a Index on every loop. After that I added the second Collection Operation where I used the Add functionality to store the values to CollMatateriaDescription-collection variable and used the index there to add always the next value to the last of the variable string.

 

The reason for the index was that I needed to have the values in same order as the values are in the column where I got the values for the list query.

 

Happy happy.

View solution in original post

0 Kudos
Reply