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

Get the Items NOT selected from Collection

Hello, Im trying to REMOVE items from a collection.

1. Populate a collection of ALL IDs possible (example: 1,2,3,4,5,6,7,8,9,10,11,12)

2. Loop through the IDs that have been selected (example: 1,4,5,11)

3. Want to REMOVE IDs that appear in my selection from the full list

4. Result in a collection of IDs I didnt select (example: 2,3,6,7,8,9,10,12)

Havent been able to get this done since, would appreciate a fresh set of eyes.

0 Kudos
Reply
2 Replies
lakshminarayana
Nintex Newbie

Re: Get the Items NOT selected from Collection

Can you try this way and check it.

1. Get the item Ids into 'Col1'.

2. Get the item Ids into 'Col2' based on some selection.

3. Use 'For each' action to iterate through each item in 'Col2'.

4. Use 'For each' action to iterate through each item in 'Col1'.

5. Use 'Set a Condition' or 'Run If' action to compare, if item in 'Col1' is equal to item in 'Col2'.

6. If equal then Remove that item from 'Col1' using 'Collection' operation (remove).

7. Store Result in 'Col1'.

0 Kudos
Reply
Highlighted
emha
Nintex Newbie

Re: Get the Items NOT selected from Collection

you can achieve it eg. following way.

 

- create for each loop over select IDs collection. save current element into a variable

- within the loop, use collection operation on all IDs collection and its operation 'Remove by value'. use variable from above step to identify which element to delete from the collection.

Reply