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

How to remove duplicates from a collection obtained by querying multiple items in the list

Jump to solution

List column-

Partner - Person or group type which accepts multiple people.

Requirement: I need a collection of unique partners in collection variable.

I query list where partner != "Null" and store outcome in coll variable "partners" EX: partners= {aa; bb;aa; aa;bb;cc ;aa ; bb}

Carry out collection op to remove duplicate from "partners" coll and store it in "unique".

Expected Result: Unique= {aa; bb; cc}

Result: Unique= {aa; bb;aa; aa;bb;cc}

Problem: the collection operation somehow batches the results from the different item ID's rather than considering each itme seperated by semi-colon as an item.

Labels: (1)
Reply
5 Replies
emha
Nintex Newbie

Re: How to remove duplicates from a collection obtained by querying multiple items in the list

Jump to solution

have you seen 'Remove duplicates' function of Collection operation action?

Reply
sushilspai
Nintex Newbie

Re: How to remove duplicates from a collection obtained by querying multiple items in the list

Jump to solution

Yes i have. My problem is index in the collection.

Collection={aa; bb; aa;bb; cc; aa;bb;cc}

index:

1= aa;

2=bb;

3=aa;bb;

4=cc

5=aa;bb;cc

6= aa

Each index value result is coming from the different items in the list as a collection of query.

Now, Is there a way to get collect result as c={aa; bb; cc}

The Remove duplicates action will give the result of unique index values i.e,

C={aa; bb; aa;bb;cc;aa;bb;cc} 

0 Kudos
Reply
paul_crawford
Nintex Newbie

Re: How to remove duplicates from a collection obtained by querying multiple items in the list

Jump to solution

Hi

Try using a regular expression action to split the values first, then save to a collection and use the remove duplicates action. That should work

 

Reply
nj
Nintex Newbie

Re: How to remove duplicates from a collection obtained by querying multiple items in the list

Jump to solution

I think if you split the values as they are now(aa; bb; aa;bb;cc;aa;bb;cc) you'll wind up with "bb;" and " bb;" as two different values. 

I actually would start with removing spaces, then split by the ";" character, store in collection, then remove duplicates on the collection. I may be adding extra steps where not needed though. 

0 Kudos
Reply
sushilspai
Nintex Newbie

Re: How to remove duplicates from a collection obtained by querying multiple items in the list

Jump to solution

Worked like a charm! Thanks!

0 Kudos
Reply