Question
Cognizant Technologies
AU
Last activity: 26 Feb 2017 2:20 EST
Obj-Browse to fetch multiple rows from Data Table and assign the response to a PageList
Hi,
I have a requirement where i need to use Obj-Browse to fetch multiple rows from Data Table and assign the response to a PageList under Work Class, so that i can populate the response in a Grid having the Source as PageList.
I Created an Activity, where i configured Pages & Classes as: newCustomer .....-Data-Customer
I have a property of type PageList, having name as CustomerDetails, i need to set the response of Obj-Browse into this, i am unable to figure it out.
Please someone help me how to achieve this.
Attaching the Screenshot of Activity Step Configuration
***Edited by Moderator, Maryrita: Moved to Product Support from Applications***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accenture Australia
AU
Hi Alok,
Get the details from the data table to the pagelist page and use the page copy to copy the details by putting the loop and using the current context.
Thank you.
Cognizant Technologies
AU
If you don't mind, could you share a sample screen of the configuration of Activity in order to achieve this
Pegasystems Inc.
US
Alok,
Here's the pertinent part of a quick activity I whipped up to demonstrate. The missing piece is that the page MockWorkPage would be the work object and the property ListOfResults is the page list property defined in the same class. In my case the obj-browse lists all the properties defined in my application.
I hope that helps,
Mike
-
Sri Sai Divya Kondapalli
Cognizant Technologies
AU
Hi Mike,
Thanks for you reply, but i am sorry to say, when i use work.CustomerList (here work is the work Object where there is a PageList property named as CustomerList), it's raising an error.
Attaching the configuration of my Activity
Please help me, not able to figure out, where i am missing something.
Thanks..
Tech Mahindra Ltd
CA
if you have still issue..Please check sample code
Cognizant Technologies
AU
Hi YellaiahB,
Thanks for your very helpful response. I followed the same instruction mention by you in above document, and worked quite good till Obj-Browse but while going for Page-Copy again it's throwing error, not to forget i need to set the response in a Work class i.e. Work-CircumstanceDemo which holds a property named as CustomerList of type PageList.
Attaching the complete configuration along with my Activity, Data Type &Work Class Structure under App explorer as screenshot, unable to figure out what is the issue.
If somehow i am able to set the response to this PageList property then i can populate the data in a Section using this PageList
Tech Mahindra Ltd
CA
Select Loop in Page-Copy method.
Cognizant Technologies
AU
HI YellaiahB, Thanks for your suggestion, Now the activity is getting save properly, but i would like to know, how this looped values will be save into Work class PageList property.
Let's say my class is work-MyDemo which contains a PageList property named as CustomerList , currently CustomerList.pxResults refers to Data class. so that i can form a section for this PageList property and can populate in a Section
-
ASHOK KUMAR SANKATI
Virtusa
AU
Hi Alok,
I had gone through your activity document. What I understood from that is, you have your data in data class and want to save that in work class page-list property.
1) you have done an obj-browse method on data class and stored all the results in datatablepage.pxResults.
2) In pages and classes for CustomerList give class as code-pega-list.
3) and for CustomerList.pxResults give your work class name.
4) In page copy method loop over those pages giving step page as datatablepage.pxResults
5) give copy from as datatablepage.pxResults(<CURRENT>)
6) give copy into as CustomerList.pxResults(<APPEND>).
7) now u will have all the data on CustomerList.pxResults page in clipboard and can use this as a source.
Cognizant Technologies
AU
Hi Navakantham, Thanks for your reply.
I tried your suggetions, Activity saved well as earlier, but the response is not getting into Work class PageList property. Also when i replaced <CURRENT> with datatablepage.pxResults(<CURRENT>) for CopyFrom the i found that many blank rows got Appended for DataTable.pxResults, so i replaced it back to <CURRENT>, also i have a doubt, as you mention CustomerList.pxResults referring to Work Class, but if i have more than one PageList property under this Work Class then using "copy into as CustomerList.pxResults(<APPEND>)" will copy the value into which pageList. However the DataTable.pxResults holds all the rows but not getting coping into pyWorkPage i mean Work Class (Work-MyDemo having a Property CustomerList). Thanks