Question
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690017000/9c950853-cf72-49db-8eb3-908df750b88e.jpg?itok=-Cm7jftb)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690017000/9c950853-cf72-49db-8eb3-908df750b88e.jpg?itok=-Cm7jftb)
BPM Company
NL
Last activity: 11 Feb 2018 10:16 EST
Apply DataTransform to each element in DataPage (List)
Hi everyone,
Given:
1. Work- class with DataTransform
2. Data- class with D_PageList (pxResultCount > 1)
Here's the screenshot:
The problem is that newTest DT applies to Data- class. But I need to have it in Work- class to operate inside work object.
It's quite a simple task and I had believed that Pega should cope with such situation.
How can I use inside For Each Page loop DT from Primary class (Work-) and provide <current> element to that DT?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690017000/9c950853-cf72-49db-8eb3-908df750b88e.jpg?itok=-Cm7jftb)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690017000/9c950853-cf72-49db-8eb3-908df750b88e.jpg?itok=-Cm7jftb)
BPM Company
NL
Eventually, I've created an activity which iterates through the data page .pxResults and calls data transform from Primary step page
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
Hi,
Could you please try adding the class in the "Pages & Classes" tab and use the Data page name with reference of the Page name given by you.
Regards,
Vikash
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690017000/9c950853-cf72-49db-8eb3-908df750b88e.jpg?itok=-Cm7jftb)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690017000/9c950853-cf72-49db-8eb3-908df750b88e.jpg?itok=-Cm7jftb)
BPM Company
NL
Find my answer below. Is it that you proposed?
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
Hi,
Can you try with adding your data page (ex: D_PageList) and the its results list page (ex: D_PageList.pxResults) to Pages & Classes with corresponding classes ?
Thanks,
Santhosh
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690017000/9c950853-cf72-49db-8eb3-908df750b88e.jpg?itok=-Cm7jftb)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690017000/9c950853-cf72-49db-8eb3-908df750b88e.jpg?itok=-Cm7jftb)
BPM Company
NL
I already did it:
But still, Pega tries to find newTest datatransform in Data- class, not in Work- class.
Is it achievable by using DT or should I use an activity instead?
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
Hi,
Now I understand your requirement better. Calling DataTransform of one class (Work-) on other class's page (Data-) is not possible and its not recommended as well, because when you run the Work- DT on Data- Page, you will be able to initialize/set properties of Work- class only but not Data-.
But if your requirement is to read the data from Data- page and use it inside the Work- Data transform, you can set the required values on parameter page and pass them to Work- DT. If the no of properties you want to read from Data- is less, you can follow this approach.
Thanks,
Santhosh
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689968000/0b8d2ee8-8ef3-4265-b11f-1689ec86e260.png?itok=xdXaqBDY)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689968000/0b8d2ee8-8ef3-4265-b11f-1689ec86e260.png?itok=xdXaqBDY)
Pegasystems Inc.
US
Try this:
define tempPage of type "**-work-booking" on pages and classes.
step 1.1 = Update Page - tempPage ("Primary" page might work as well)
step 2.2 = Apply data transform. You can access Data Page properties by enabling the checkbox on step 1.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690017000/9c950853-cf72-49db-8eb3-908df750b88e.jpg?itok=-Cm7jftb)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690017000/9c950853-cf72-49db-8eb3-908df750b88e.jpg?itok=-Cm7jftb)
BPM Company
NL
Like this?
That's almost work :)
Unfortunately, there is no way to pass D_Test123List.pxResults(<current>) into 1.1.1 as parameter :( Exception occurs
Checkbox on the 1st step also didn't help
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689968000/0b8d2ee8-8ef3-4265-b11f-1689ec86e260.png?itok=xdXaqBDY)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689968000/0b8d2ee8-8ef3-4265-b11f-1689ec86e260.png?itok=xdXaqBDY)
Pegasystems Inc.
US
You could store the DPage.pxResult onto a temporary page Or on the Param page itself.
PS: This is the reason why data transforms are best created under Code-Pega-List.
Accepted Solution
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690017000/9c950853-cf72-49db-8eb3-908df750b88e.jpg?itok=-Cm7jftb)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1690017000/9c950853-cf72-49db-8eb3-908df750b88e.jpg?itok=-Cm7jftb)
BPM Company
NL
Eventually, I've created an activity which iterates through the data page .pxResults and calls data transform from Primary step page