How to remove duplicate values from each page in pagelist

Hi All,

I have the below requirement

Pagelist.pxResults(1).pyText = [email protected];[email protected]

pagelist.pxResults(2).pyText = [email protected];[email protected];[email protected]

I want to retrieve only unique values from above results [email protected];[email protected];[email protected]

Tried @pyRemoveDuplicatesFromPagelist , it removes duplicates only if all the values in both the pages matches . So in my case its not working.

Please help me with the above requirement

Thanks

Hi @SwathiM5232: There is no OOTB feature available to do this. You can still achieve this programmatically

  1. Loop through your page list
  2. Tokenize the string based on delimiter and append the results to a new page list
  3. Remove duplicates from the new page list

Thanks

@ArulDevan Hi Arul thanks for your reply.

I didnt understand step 2 .Could you pls share screenshot if any. It would be helpful

Many Thanks

Hi @SwathiM5232: Sorry. I don’t have docs for this. Let me try to explain.

Within the loop you need to split pyText based on the delimiter (semi colon in this scenario) and can append it to a page list. To do this, you can either create a function (similar to pxParsepxResults) or can use Parse-delimited.

Once you have the page list, then you can remove duplicate from it.

Please let me know if this helps.

Thanks.

@ArulDevan Hi Arul.. Thanks for the clarification

As Suggested by you , I have created parse delimited rule similar to above and the results are getting stored into a value list (.IMOEmailList)

.IMoEmailList(1) , (2)…etc

Now how do we set this value list to a pagelist in activity.

Pls suggest.

Many Thanks

Hi @SwathiM5232: You can loop through the value list in activity using for each element in value list.

Another suggestion: instead of doing the parse delimited for each loop, build a single sting with all pyText and use Parse-delimited once.

Thanks

@ArulDevan Thanks Arul , 2nd option helped