Posted: 7 Feb 2019 17:07 EST Last activity: 8 Feb 2019 4:45 EST
Usage of Top in DT is allowed or Not
I read in the PDN articles before, that the usage of the TOP keyword in DataTransforms is against the Pega recommendation because the handling of "Top" can change based on when and where it is used. But in the recent exercises for CSA, it is mentioned to use TOP. So, are we allowed to use it here? if yes, why is it against Pega recommendation?
***Moderator Edit-Vidyaranjan: Moved from PSC to Academy***
Pega usually do not recommend using Top in Data Transforms because the handling of "Top" can change based on when and where it is used.
The root cause of the problem is that "Top" is a special keyword that is not always handled by all assembly code. It will likely be handled correctly by actions such as Set, which are primarily handled by the expression parser, but may not be handled properly by other actions such as Update Page, which does not use always use the expression parser.