Posted: 25 Dec 2016 23:10 EST Last activity: 7 Jun 2017 13:37 EDT
How to display the records of a data table in the UI with out creating data page
I am learning Pega. I want to show the records of a table in a section.
I have a local storage data type and is having 10 records with columns Id, Name, State, Country
I have created an Activity. Attached is the Activity screen grab.
Now with out using the Data Pages, how to show the records in a table format.How to refer the Activity in the Repeating Layout without data pages concept. I am able to do with data pages and referring the data page in the repeating layout. I am looking for a different option.
***Updated by moderator: Lochan to update Categories***
Thanks a lot for your reply. CTypeList is not a data page. My requirement is to show the records of the local data storage table in the UI. I want to know how to refer the Activity in the UI. So which layout i have to use hear except Repeating layout.
Posted: 4 years ago
Posted: 26 Dec 2016 0:56 EST
Dileep Kumar Balaga (Dileep Kumar Balaga)
Senior Decisioning Specialist
Adding to the kasun..using of activity for the small things will definitely degardes the performance of the application.For retreving the data from the data table data pages is the best method. We need not to create the data pages when you first access the data table pega will automatically creates the data pages. In the section you can refer the data page by giving the name and the class of the data page.
"For retreving the data from the data table data pages is the best method. We need not to create the data pages when you first access the data table pega will automatically creates the data pages".... I have created a data table. After creation of data table, by default two data pages created automatically. One is with structure as Page and the other is with the structure as List. I tried to use the list data page but it didnot work properly. Below are the steps which i used for my requirement. My requirement is to show the records of the table in the UI.
1. Create a data table with 10 records. This is in local storage.
2. Created a data page with the structure as list. Because existing list data page is not working.
3. Code-Pega-List :- Created an Activity with this in class. Refered the above data page here under the PageName of Obj Browse method in Activity.
4. Refered this Activity under the Source -> Activity.
5. In UI - Section- Repeating Layout - Data Source - Data Page
This is working as expected and i am able to see the records.
My question : Is there any other way to show the records with out repeating layout and data page. I heard by referring Code-Pega-List in Pages&Classes, we can show the records. But not sure how or where to refer the Activity. Appreciate your kind response. Currently i am using 7.2 PRPC.
You have alternatives for use of Data page as I mentioned earliar.Use a Report Definition or a Clipboard page of type Code-Pega-List.You can reffer get content activty as a Differ load activty or by any other caller activity to populate the results before rednering screen.
But one thing is common you should use a repeating layout to display the content. It can either be a grid or a repeating dynamic layout based on your requirement.
1.Create a data table with 10 records. This is in local storage.
2.Call activity to get content.This can be a Pre Activty on a flowaction,call activiy from any other activity or differ load activity as requirement.This will have a Obj-Browse on the data class mapped to the data table created , and will have results Page list type as Code-Pega-List
3.Add a repeating layout in the section and source should be the Clipboard Page with results of step 2 .(Type Code-Pega-List)
But directly referring report definition in the grid layout source is not the best practice.Use Call pxRetrieveReportData from activity to call a report definition(Need to pass some params to pxRetrieveReportData).Create one Pagelist property.Then map retrieved records to that property and display it in UI.