how to describe “current page” when I want to update a page of a loop context
as below sample
it works, however is there any more graceful expression here?
I just want to tell this is “current page”
how to describe “current page” when I want to update a page of a loop context
as below sample
it works, however is there any more graceful expression here?
I just want to tell this is “current page”
The current mentioned here is not the current page but the current index on which the loop is running. So whatever is the index of the context at that time is considered.
@SohamM95 so it’s not a graceful expression, any better suggestion?
(like “this” in java)
Hi @MaxonL16591286,
Your current approach using <CURRENT> inside Primary.pxResults(<CURRENT>) is the correct way to reference the current page in a loop within a Data Transform. If you’re looking for a cleaner way, Pega does not provide a direct alias like “this” from other programming languages.
A recommended approach is to continue using <CURRENT> as it is the standard method in Pega and easily understandable. Alternatively, since you’ve checked “Also use each page as source context”, you can directly reference properties like .Type instead of Primary.pxResults(<CURRENT>).Type, making it more readable.
Thanks
Regards
Raja
@Koti Raja
Thanks. so, there’s no my expected solutions so far.
You can use IndexInPageList and save it in a param. Then later you can directly input Primary.pxResults(Param.Index).