pyForEachCount In Pega

pyForEachCount holds the current iteration number. You can examine (but not alter) this value in the step. When processing the For loop or iterating over a Value List or Page List property, the parameter param.pyForEachCount holds the current iteration number. You can examine (but not alter) this value in the step. For example, to iterate only over the first ten pages or values, you can exit the iteration when pyForEachCount is greater than 10. In below example we will see how we can use pyForEachCount in data transform and set value in .pxResults.