Discussion

Removal of duplicates in Pagelist

Hii my requirement is need to remove of duplicates in pagelist, is there any activity method or any other way?

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

February 3, 2013 - 11:44am

Any boby help me on this please.

 

 

Thanks in advance

February 5, 2013 - 11:43am

You can use the below piece of code in your activity via java step.

    pega_rules_utilities.removeDuplicatesFromList(myStepPage, strPropName, strClassName);

myStepPage is ClipboardPage

strPropName is property name

strClassName is className

February 5, 2013 - 2:15pm

Thanks for  your information GANGIREDDY

 

 

 

Thanks in advance

February 6, 2013 - 8:07am

Hi GangiReddy,

We tried the way u suggested to remove duplicates, But it didnt workout... The step is getting executed and i am not getting any errors, but duplicates are not removed..

Regards

sridhar

February 12, 2013 - 9:59pm

Hi Gangisetty,

You could try , may be not your exact requirement

For each embedded page, copy from the pagelist containing duplicates into another pagelist with pre condition using the function IsInPagelist() if true exit iteration else continue

June 12, 2015 - 6:09am

This is the pagelist which is having duplicates

TemplistA.pxResults(1).pyLabel = 1

TemplistA.pxResults(2).pyLabel= 1

TemplistA.pxResults(3).pyLabel= 2

TemplistA.pxResults(4).pyLabel= 3

 

Define one more pagelist

TempB.pxResults

loop thorugh the first pagelist

get the pylabel value into a parameter

param.label = .pyLabel

 

add a child step to the above setp

for the child step provide a When condition,do page-copy

IsInPagelist(param.label,".pylabel",TempA.pxResults)

If the condition is true Exit Iteration

If the condition is false Continue

 

and

 

<current>

TempB.pxResults(<APPEND>)