Caching Strategy for Pega’s Search and Select
The Search and Select pattern is a user experience design used in Pega applications to help users quickly locate and choose objects of interest during case processing. It’s especially useful in assignments where users need to interact with large datasets or external systems.
This article outlines a specific use case where the Search and Select pattern is configured to integrate with an external data source, focusing on optimizing GET calls for performance. By default, the out-of-the-box (OOTB) Search and Select implementation makes multiple GET requests to the external source—for example, one to retrieve a filtered list of results based on the search criteria, and another to fetch the selected item. This use case demonstrates how to reduce redundant calls and improve efficiency by caching or reusing data between search and selection steps.
Solution
(Implemented on 24.2 platform)
This guide will use https://rickandmortyapi.com/documentation as its external data source.
1. Setup Search and Select
Configure Search and Select with an external data source, refer to the article for implementation details.
NOTE: Only the List Data Page needs to configured with an external data source.
There will be three key data pages: one for the individual data object, one for the parameterized list of data objects, and one for the filtered results returned by the Search and Select interaction. A cache data page will be created in the next step.
2. Create a new List Data Page under the same object type to cache the search results.
a. Select Activity as the Source and create a new activity that copies the parameterized list of data objects. tor
3. Configure individual data object Page to source an activity. This will build our selected list without making another request call to the external source.
a. The data page should accept a parameter that serves as the key.
b. The activity should iterate through the cache data page and copy the page that matches the parameter key.
4. Update Search and Select Data Transform to perform the actions "Remove" and "For Each" on your cache data page as shown below.
5. To configure the search and select pattern in a case type refer to this article.
https://support.pega.com/discussion/list-view-search-and-select-ux-patt…
6. To implement a persistent table that retains selected characters across various selection patterns, please refer to Case 4 in the referenced article.
https://community.pega.com/conversations/user-experience/advanced-use-c…
Initial Search
Second Search