Sunday, 29 July 2018

How to Call Data Page from activity, How to copy one page list to another page list, How to remove Pages stored in clipboard using Activity

Now we will see 
  1. How to Call Data Page from activity?
  2. How to copy one page list to another page list in activity?
  3. How to remove Pages stored in clipboard using Activity?

First of all I have an data page I configured Report definition in that data page, when my data page runs It will retrieve all the data stored in my table 


Now Below image shows the retrieved data while running the Data Page.


Now our requirement is to run this same datapage in activity ,lets see how to do that.

In activity, there is an method "Load-DataPage" to run data page in activity here in parameter we have to give Pool ID- a unique value(in my activity i gave ABC),  and in Data Page we have to give the datapage what we wants to call.


Now we will see Whether its works or Not?

In the above Picture u can see all the data it retrieved.


Next we will see how to copy this retrieved data in clipboard to our own pagelist property 

In Pega , there is an method Page-Copy, we can use this method to copy pages. In CopyFrom we have to give the Page from which we have to copy and in CopyInto we have to give the target page.



In our scenario the Source page is the page list in clipboard to page list that I created(.Values)


I gave Source Page name as D_HRPlanList  and in Target Page I gave my PageList that I created .Values

I gave Append in .Values , This is because I am appending all the data available in Source Page to Target Page.


Now on Run the Record We can see the Result.


Now Next we have to Remove all the pages in Clipboard, if we don't need all the data in pages means we can remove those unwanted page from clipboard.

Now I use Page-Remove method to remove page "D_HRPlanList" from clipboard


Now Check Whether the Page still there in Clipboard or not.


Now U can see the page is removed from the clipboard.

5 comments: