Edit Content

Novitates Tech is committed to shaping a digital landscape that empowers businesses globally, offering accessible transformative solutions that ignite industry-wide change. Our dedication to innovation drives us to create strategies that redefine global business operations.

Get in touch

Introduction

The Search and Select pattern in Pega Constellation enables users to search for entries in the system of records using specific criteria. Upon the search, results are displayed in a table, allowing the user to select a single entry. This guide demonstrates the configuration and usage of this pattern, offering practical insights into its implementation.

Implementation

performing Set Up a Simple Data Type

  • Populate the data type with sample records to demonstrate functionality.

Create a New Field

  • Create a new field named “User” of type Data Reference.
  • Map the field to the corresponding data type.

View in Dev Studio:

  • The property will reference the pyGUID parameter using a self-referencing property notation.

Configure a Data Page

  1. Create a Data Page named “D_Mappings” of type List.
  2. Set the data source to the Data Transform “PopulateMapping”.
  3. Mark the load strategy as “Reload once per interaction”.
  4. Check the option “Allow query using a JSON object”.

Create a Report Definition

  • Define input parameters such as Name and Mobile.
  • Add these parameters as filter criteria for retrieving specific data.

Configure a Data Transform

  • Create a Data Transform named “PopulateMappings”.
  • Use the pySearchPageName OOTB parameter to pass search criteria entered by the user (e.g., Name and Mobile).

UI Configuration in App Studio

1. Navigate to the View:

  • Add the User field (Data Reference) to the desired view.

2. Configure the User Field:

  • Link the Data Page (D_Mappings) created earlier.
  • Set the mode to Single-Select.
  • Choose the display option as Table to enable the search feature.
  • Configure the display field as Name.
  • Select the columns to show in the results table.

3. Enable the Search Feature:

  • Specify the fields (e.g., Name, Mobile) to use as search criteria.

4. Save and Test:

  • Submit the view, save the case type, and test the functionality.

Test Results

Verifications:

1. Search Component Visibility:

  • Create a case and ensure the search and select component is displayed on the UI.

2. Search Scenarios:

  • Name Search: Enter content in the Name field and verify the results.

  • Mobile Search: Enter a value in the Mobile field and validate the results.

  • Combined Search: Use both Name and Mobile fields for refined results.

Important Note

  • The Mobile field currently displays as a plain text field, accepting any input. Ideally, it should use the OOTB phone component to allow users to select a country code and input numeric values only.
  • This feature is scheduled for release in Pega version 24.2 or later.

The Search and Select pattern in Pega Constellation provides an efficient way to search and retrieve data. By following this implementation guide, developers can seamlessly configure the feature and enhance the user experience.

Author Credits 

Jayachandra Siddipeta

Vice President, Technology

LinkedIn: https://www.linkedin.com/in/jayachandra-siddipeta-hyd 

Continue reading