How to get current index in for each page loop

Hi All, In this blog we will see how we can get loop count value for each iteration. How to get current index in for each page loop? You can make use of Param.pyForEachCount to get current iteration index value. This is pega ootb parameter. Lets create an activity to demonstrate this. Add above steps in activity. And now run the activity and open tracer to check value of Param.Index, Param.Count and Param.Cnt which will give loop index or loop iteration number. Now open Property-Set line 190 and open Parameter Page Name We get last loop count value in all Param variables that we define in activity. Now we can use these value in our business logic as per requirement Thank you!! Will see you all in next blog post 😊.