Question
IT Solution Service
SG
Last activity: 14 Jun 2021 7:38 EDT
How to use Data Page for grid
Hi,
When I run a wizard to create a Connect REST, it creates Data Page by itself. Now, I want to create a grid (table) in a section to show all the records that are retrieved by Connect REST, but I don't know how. Can someone please help.
For example, I have a D_XYZ and it returns multiple rows of results. Simply I want to show these records record in a drop down. So I selected Data Page for list source for drop down. And, I appended ".result" as below but Pega won't save this configuration.
I guess this is because here I am supposed to specify the name of Data Page, but if I do so, of course it won't work as Pega would not know the name of result property. Since this is a Single Page type Data Page, what would be the easiest way to achieve this? Why doesn't Pega create a Page List type of Data Page?
Thanks,
***Edited by Moderator Marissa to update Platform Capability tags****
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
IN
Hi,
Did you tried by only specifying name of datapage instead of
for example
D_XYZ
Please check below screenshot
Thanks
IT Solution Service
SG
I tried but it does not work. The reason is, Data Page that Connect REST wizard generates is not "List" type but "Page". This single page Data Page has multiple results sets under top page but the name is not "pxResult" but their own named property - in my case, "result". It could be anything because it is up to external system.
In your case, "D_ListOfOperators" Data Page is "List" type and yes in that case your configuration works.
Updated: 14 Jun 2021 7:38 EDT
Pegasystems Inc.
IN
If the source for Grid will be a list and when you source it with Data Page, then you can give the data page name directly instead of referring to D_XYZ.pxResults.
IT Solution Service
SG
No, the Data Page that Connect REST generates is not "List". Why does Pega create only "Page" type Data Page, and not "List" type? How do people show list of result set in the Data Page? I don't want to create a new unnecessary page list property for only this purpose?
Updated: 14 Jun 2021 7:38 EDT
Pegasystems Inc.
IN
You can mention the source as property and mention D_XYZ.result in the list/group and define D_XYZ and D_XYZ.result in pages and classes.
IT Solution Service
SG
Yes I tried but it does not make any difference. Does it work for you?
Updated: 14 Jun 2021 7:38 EDT
Pegasystems Inc.
IN
Yes, It worked for me. Could you please explain the issue you are facing doing so.
IT Solution Service
SG
Sorry, you are right. If you select "Property" instead of "Data Page" it works. However, it only works if the Data Page doesn't need any parameter. If Data Page requires a parameter, how can I specify that?
- Data Page works fine if string parameter "symbols" are passed.
- I do not see anywhere I can pass parameter for Data Page.
I think this is why it returns no records.
Thanks,
Updated: 14 Jun 2021 7:38 EDT
Pegasystems Inc.
IN
If the Data Page has parameters, then I think the option would be to use Pagelist property and refer it to the Data Page.
IT Solution Service
SG
When I test Data Page directly, it shows a field for parameter (please see prior screenshot).
However it doesn't show anything when I use Data Page in Table (please see prior screenshot).
Updated: 14 Jun 2021 7:38 EDT
Pegasystems Inc.
IN
If you use the Data page as source, then you will be able to see the parameters. In your case as your data page don't have pxResults, you won't be able to use it.
As an alternate you can append the result to pxResults in the response Data Transform the Data page, then you should be able to use the Data Page source.