I am reaching out for help in implementing below use case.
Requirement: User will enter search criteria (First Name, Last Name, SSN) to search for a patient, from the search result they will select a row, additional details (via API call to display Contact details) will be shown for the selected patient in the same screen.
We have created a data reference property that brings patient search results via an API call and displayed it using Single select Search and Select template. After selecting a row we are not finding any option to make the next API call and show additional details. This API call will be made using the selected patient’s patient ID to bring more data for that patient.
When using Search and Select template, there is no option to enable edit for the table columns. Below is Search and Select implementation screenshot.
Appreciate any insight or recommendation for this.
In Constellation, the Search and Select template is designed as a picker control that binds the selected row key. Because Constellation intentionally decouples UI controls from procedural event handlers (such as OnChange or OnSelect local actions used in Traditional UI), you cannot attach direct row-click events or enable cell editing inside a Search & Select table.
you can follow one of the 2 standard design patterns below-
Parameterized Data Page Sourcing
Instead of trying to trigger an explicit event on row selection, let pega’s declarative state management invoke the secondary API automatically when the selection updates.
Create a Data Page and define ‘primaryID’ as a required parameter on this DP.
In your View configuration, place a Data Reference field or Embedded Data View directly below the Search & Select component.
Source this view using the DP created above
Two-Step Assignment Pattern
If the secondary API call is expensive, requires user confirmation, or requires business validation prior to execution, then when user performs the search, selects a patient, and clicks Next / Submit, case advances to the next step, the second assignment view automatically loads and displays Details
Constellation removes procedural UI hooks on list components by design. Whenever you need sequential or chained API calls based on user selection, leverage Data Pages with required parameters bound to the selected state property.
Option 1: I haven’t tried this personally, but since this is a Single Page Data Reference, the Form Refresh Settings should be triggered when a result is selected. You can use Form Refresh Settings to control the trigger the data page for additional view and then apply a visibility condition on another view based on that selection.
Option 2: Consider implementing it as a Screen Flow, which may provide more flexibility for handling conditional views and navigation.
Thanks for responding. I am going with Option#1. Created a DP of mode Page with a required input param. But in the view unable to source this DP as the view requires a list Page DP. Even with the list page DP the UI is not showing the desired values from the DP, could be a refresh issue? Could you please help
@ArundhatiD17879854 The reason you are seeing a mismatch where the View asks for a List Data Page is due to how the field’s underlying data model is defined on the Case/Data Object.
If the target property is defined as a Data Reference (Multiple Records / Page List), Constellation will enforce a List Data Page. However, since you are displaying contact details for a single selected patient, the property must be defined as a Data Reference (Single Record / Page) or Embedded Data (Single Record).
Verify below configurations-
Property & View Alignment:
Ensure the property meant to hold the details of contact view is configured as a Data Reference (Single Record) pointing to your Patient Data Object.
Refresh / Desired Values:
Constellation relies on Redux state-driven reactive updates. If the view isn’t showing values, it is almost always caused by one of two things
State Subscription Trigger: Make sure the Search & Select template is explicitly configured to store the selected record’s key directly into a property like SelectedPatientID. As soon as the radio button is clicked, Constellation updates SelectedPatientID in client memory, which instantly triggers the evaluation of your Data Page
Visibility Guardrail: Add a visibility condition to the patient details View / Data Reference field. This prevents the Data Page from attempting an evaluation with a null parameter on initial screen load.
Thanks for responding. I am going with Option#1, trying to refresh the form. But could not trigger form refresh settings when a result is selected, tried using one of the properties that is displayed in search result column but did not work. Instead when I am keeping a separate checkbox field and using that to refresh the form its working the way you have explained to trigger a DP to load additional details. Is there a way to get rid off this extra checkbox that I had to use to trigger form refresh?
In the JSON of the data reference’s view, find the property that is present in “value”. Use that property in form refresh for it to be triggered on selection. If “value” does not work, go with “selectionKey”.
Thanks for the insight. I am using a single record data reference pointing to Patient object. However when configuring the view using the same property I do not have option to select a data page to source it. I can display as either Form or Combo Box and gives me option to choose from defined views (Create, Edit, Details etc.) on the data object.
I did Form refresh settings in the FA and called a DT there to call second API. It seems to be working.
For that approach which @RaviChandra is talking about , the option to call a data page is present in the property definition itself. In the property definition we need to configure a single page data page. You can configure that single page data page to call the API. In this way, the API response is directly saved into the data reference property.
Data reference field works as follows:
List Data page configured in view fetches records → User selects a record → Single page data page configured in the property is called to populate the data reference property based on the selection.
This out-of-the-box reactive pattern is much cleaner and more maintainable for showing patient information than relying on manual form refresh Data Transforms.
Hi @VVNagaSaiN I tried your approach but it is now working. I have used both SelectionKey and Value to trigger the form refresh. Could you please let me know if I am missing anything.