Empty List on Load in Constellation Landing page

Business requirement

In one of the projects, we have a requirement to display the list of cases from different applications when the user searches based on few search parameters. On initial load of the screen, the list should be displayed as Empty and only when the user enters values in the search parameters, then system should fetch results based on search parameters. This is legal requirement because the user should only see the cases which they can work on based on an external authority matrix which is connected via REST integration.

We have implemented this in UI-Kit , where users can search based on specific criteria on a landing page and the system fetches the results based on the entered criteria after checking that user has access to see the results based on the external system.

Constellation OOTB

When you create a Case Type, the OOTB List Data page is created and is sourced by Report Definition. When you use this Data Page, it will always trigger results on load of the landing page. You can add Filters to get empty List on first load. But then promoted filters will not work to fetch results because it will not replace the initial filter condition added to achieve the empty load. Another alternative would be creating a search Case Type and give the user to search cases, but that would be using the search and select pattern. But here the requirement is only to search and not select or work on that specific case. We needed to find another way to solve this challenge.

How to implement with Constellation

https://players.brightcove.net/1519050010001/default_default/index.html?videoId=6377116860112

Video presents a a simple implementation with a single search parameter in promoted filters. In real world scenario, we can build complex implementation with multiple promoted filters as well.

Implementation part 1: Service REST implementation

Build a Service REST which receives the search parameters in the request.

Ensure the service activity will check and validate the search parameters , in case of empty search parameters , do not send any result.

In case of search parameters exist (In this example : InsKey, then data page will run the 1st source as shown in the above screenshot to get list of cases based on the InsKey, form the response

Implementation part 2: Connect REST implementation

Source the data page with a connector and Enable Allow querying any column

Create a Connect REST rule which calls a Service REST endpoint.

Configure the request data transform in the data page to pass the search parameters as query parameters .The source for step 3 and 4.2 and 4.3 is written based on the query page formed when you add a promoted filter in a list view. This structure can be found when you check in the network tab during a interaction between the browser and Pega server.

Configure the response data transform to map the response on the data page.

Implementation part 3: UI view configuration

Use this data page with source as Connector in Landing page in Constellation Portal.

Map the fields to be displayed in the view

Test the implementation.

@RoshanC8055 This is one of the fantastic discovery and “pushing the boundary” in Pega Constellation. Great work Roshan!

Amazing how many times this comes up. Commenting to boost this on the new Pega Forums - even being referred to today (see Advanced search and open a case in landing page in constellation 25.1 ) :slightly_smiling_face:

1 Like

@RoshanC8055 just to add some more details to this article. You do not need to use REST to utilise properties from the Promoted Filter (pyQueryPage). This can be done using Data transforms and/or Activities without using a Rest Connector (though caution on the Activities as these are not best practices).

Your article clearly states it was a requirement to have an external authority matrix with is connected via REST integration. So this influenced your design choice.

However, it might be missed by the reader if they do not read this article in its entirety, so want to reiterate this.

I am unable to get a pyQueryPage created even if I use a connect-REST with advanced query options. How are you able to do that? Also, can you share a screenshot of your service activity DT. Is that just mapping the response from pyPageName.pxResults to the primary before getting the JSON? Where are the params for field, value passed from connector to the service activity to the data page?

@MarcCheong You mentioned the pyQueryPage is available when you use Promoted Filters on a list Landing page and a data page that is soruced with a data transform or an activity. I have tried to achieve this but haven’t succeeded yet. I have tried on Pega 24.1 and 25.1. I hope you can help me out.

In my use case I have a list data page that is sources via a report definition. The report definition is of a different class than my data page. The report definition uses grouping and display top ranked functionality to return 1 result per group. Via the response data transform everything is mapped accordingly to the datamodel of the data page. This works on a List landing page with promoted filters. However as I do not have the option “Allow querying any column” the promoted filters work on the data returned on the initial retrieval.

Preferably I want to use the values of the promoted filters as filters on my report definition to influence the group by top ranked result. My idea was to create a wrapper data page with a data transform. This data page has the “Allow querying any column” ticked. I create new datapage sourced by a report definition similar as the one mentioned earlier but with parameters. These parameters are then used as filters on my report definition. In my wrapper datapage I create logic to read the values on the pyQueryPage and pass these to the parameters of my data page. Unfortunately I am not able to get this to work.

We have created similar logic on a case with the search and select pattern and reading the parameterized pySearchPage. So I know the approach works but I am just not able to get it to work on a list landing page. What am I doing wrong or what am I missing?

@Ranjay_Singh_1 asked the same prior, i must of missed this (sorry).

I’ll tag you in How to force Constellation to send Promoted Filter payloads to a Data Transform-sourced Data Page? as its better to continue the conversation there (than buried in a thread for this Constellation 101)