Question4Replies7678Views ChakriP8 Member since 2014 62 posts Accenture Posted: 1 year agoLast activity: 1 year 9 months ago Closed Solved Getting the current and next index in a PageListI am unable to retrieve the index in a pagelist using the methods described in the threadhttps://community1.pega.com/community/product-support/question/getting-current-index-pagelistThe 'pxListSubscript' and 'PageListIndex' are not returning correct values. What I am doing wrong?(FYI ... ONLY when I did not find values in Step 1.1.1 did I try step 2 and then finally step 3. Please do not assume I am overwriting the value in the final step.)The pic below is representative of what is happening in my DT and how ONLY step 3 using pyForEachCount solved the issue.In the code above when my when condition is true, I want to pick up the index at that point.Only param.pyForEachCount is returning the correct value. The 'pxListSubscript' and 'PageListIndex' are not returning correct values. What I am doing wrong?My 'TestIndexValue' is an integer property.But when I do 'param.pyForEachCount +2' , what I see on the clipboard is 42 and not 6.How do I increment the returned value from the pagelist index? Any insight would be appreciated. Case Management ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Moderation Team has archived post This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question. Posted: 1 year agoMarcLasserre_GCS PEGA replied to ChakriP8Hello, Can you move param.pyForEachCount into a integer in order to be able to apply the "+2" correctly. Accepted Solution Posted: 1 year agorawap PEGA replied to ChakriP8Below code should solve this issue. @String.toInt(param.pyForEachCount) + 2 Let us know if this helps :) Posted: 1 year agoChakriP8 Accenture replied to rawapThis '@String.toInt(param.pyForEachCount) + 2' worked perfect. Thanks for this. But why is only param.pyForEachCount is returning the correct value. The 'pxListSubscript' and 'PageListIndex' are not returning correct values. What I am doing wrong? Posted: 1 year agoRajyalakshmiB Instellars global private limited replied to ChakriP8Hi Chakri, In when condition, you can directly give like .pyStageName==Primary.Something --> In that substep of when directly give .pxListSubscript in the right side. Remaining steps are as is. There is no parameter as PageListIndex. Alternate Solution for same requirement: In Data transform: 1.Take the Search for property in one parameter. Set Param.LookFor = Primary.StageName Or Something which you want to look for in Data page. 2.Set Param.Index = @IndexInPageList(Param.LookFor,".pyStageName",D_CaseStages.pxResults) 3.If you want to add 2 to returned index. Specify "Index" parameter as Integer in parameter tab. 4.Set Param.Test= Param.Index+2 "IndexInPageList" Method will return matching index in page list.