We have a requirement to build a search screen to display a subset of records. Search screen needs to have filters to limit the amount of data visible. Let's take an example of Cases, We have a requirement to build a custom search screen to display subset of cases in your experience cloud. See example screen below, it shows a data table with a list of records and three filters - Case opened date from, Case Opened Date To and Status. Without the filter, the screen shows only the open cases.
We can use Screen Flow to create a Search Screen with required filters
As a best practice, be sure to build and test Flows in a Sandbox before deploying to a Production environment
Solution : Using Separate Get Records Element For each of the filter combinations
Step 1: Go to Salesforce Setup - > Flows - > New Flow and Choose Start From Scratch -> Screen Flow and Click Create
Step 2: Create a Record List Variable that we need to use in next sections. Click the New Resource Button in the Toolbox Section on the left
Step 3: Add Get Records Action
Step 4: Add Search Screen and Add Label/API Name for Search Screen then, Drag section to the Search Screen
Step 7: Add Decision Element
We need 6 different outcomes in Decision to cover all scenarios
Scenario 1: Only From Date is populated in filters
Scenario 2: Only To Date Populated
Scenario 3: Only Status Populated
Scenario 4: Both From Date and To Date Populated But Status is Blank
Scenario 5: Both From Date and Status Populated But To Date is Blank
Scenario 6: Both To Date and Status Populated, But From Date is Blank
Step 7: Add Get Records Elements for Each Condition
Scenario : Filter based on Case From Date Filter
______________________________________________________________________________________
Written by: Sushill Kumar | Forum Ambassador
Sushil Kumar is a Salesforce Technical Architect at UKG. At the time of writing, Sushil has worked in the Salesforce ecosystem for 13 Years, holds 14 Salesforce Credentials including Salesforce Application and System Architect. Sushil serves as a Trailblazer Community Forum Ambassador, and regularly participates in the community.
If you have questions, tap into the wisdom of our entire Trailblazer Community here: https://trailhead.salesforce.com/trailblazer-community/feed
Submissions reflect only the opinions of the user who made available the Submission and not the opinions of Salesforce, regardless of whether the user is affiliated with Salesforce, and may contain or constitute products, services, information, data, content and other materials made available by or on behalf of third parties ("Third Party Materials). Salesforce neither controls nor endorses, nor is Salesforce responsible for, any Third Party Materials, including their accuracy, validity, timeliness, completeness, reliability, integrity, quality, legality, usefulness or safety, or any applicable intellectual property rights. Any Submissions made available through any message board or forum in response to posted questions, or that otherwise purports to answer any questions, including any questions about Salesforce or Programs, are made available for your general knowledge only and should never be relied upon as answers to your specific questions (even if an answer is marked as a “best” answer or with any similar qualifications). You should always contact Salesforce support for answers to your specific questions. Salesforce has no control over Submissions, and is not responsible for any use or misuse (including any distribution) by any third party of Submissions.
003876218

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.