You are viewing limited content. For full access, please sign in.

Question

Question

How to Remove Duplicates from Multi Value Token?

asked on November 9, 2016 Show version history

Greetings all. I have a workflow where I have a multi-value token that is populated with PO numbers. After the token is populated I need to go through and check to see if any of the PO numbers are duplicates and remove them. I currently have the following:

I first create a new token that is empty (MultiPO). Then for each value in the multi-value token that contains all of the PO numbers, I check to see if the current PO Number value Is In MultiPO. If not, then it adds the value to the MultiPO token and loops back through.

My problem is that it works for the first value that is a duplicate, but not for the rest of the values. I am guessing that I just have my Operator Text incorrect. Instead of 'Is In I am guessing I need to use something else to check all values in the multi-value token. I have also tried equals and that doesn't seem to work correctly either. Can anyone point me in the right direction?

2 0

Answer

SELECTED ANSWER
replied on November 9, 2016

There's a "remove duplicates" token function.

1 0

Replies

replied on November 10, 2016

Im agree with Miruna I will use in your case a replace options on the assing values

Like this I attached a video.

Regards!

1 0
replied on November 9, 2016

Workflow (I work in 9.1) does not look at all the values in a multi-value token.  It only looks at the first value.

 

If your goal is to just not have duplicate numbers when you assign the field value, What Miruna listed will be best.  Just get it set up under functions to remove the duplicates.

 

If your goal is to not even add it to the token if it is a duplicate, you would have to add a few extra steps in your workflow.  I have done this when I am making a decision based on if the value is in the token or not.

 

When you start your for each activity, create a new token that takes all the values of the MultiPO token and puts them into 1 line by using the apply index function in the token editor and choose all values separated by …

 

 

Then set up your conditional sequence to say if the Combined List Token (the new one inside the ‘for each’ activity) does not contain the current for each value.

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.