How to Apply Server-side Filters in XRL
Explore how to create server-side filters for displaying relevant records in XRL Related List View
Introduction
HyperGrid XRL allows you to control the data fetched in Related List from the database with server-side filters. By applying an intuitive Server-side filter, any user can control the records displayed in the data set of the Related List at the server level with an easy-to-use SOQL query builder, and create multiple views for a Related List with different data sets. The query builder also supports 5-level look-up fields to get access to a granular view of the data set, which is persistent and available in subsequent sessions.
Limitations of Salesforce-Related List Filters
In Salesforce Related Lists, filtering is very restricted due to the following reasons:
- Filters are applicable to only those fields which are configured to display in the Related List. This means, if a field is not visible in the Related List, the user can't filter the data based on that field.
- Filtering of records can be done only after configuring the Related List when we use Related List Single. Thus the Related List contains a lot of data that is not particularly useful for the user.
- Data filtering is not persistent, and filtered data is available only for the current session.
- In Dynamic Related List server-side filtering is available to define a condition based on which data is fetched in the Related List view. But Dynamic Related List can be configured by only admin or admin-like users. Moreover, Dynamic Related Lists display only 30 records which is gives very limited data in case of heavy data sets and is not useful for end users.
In XRL, you are empowered to define the Related List view with specific server-side filters to multiple fields and the logical conditions can be modified using AND/OR clause as necessary.
By applying server-side filters, you get rid of excess records in the Related List, which makes it easy to browse through Related List and search for relevant information.
In this article, you will learn how to apply server-side filters to different fields and control the records displayed in the Related List view.
Which type of user can use this functionality?
HyperGrid XRL Power users and standard users can use server-side filters to configure a Related List view with a specific data set that is retrieved in the view from the database. Make sure, you are added as licensed user and have required permission set to access and work on XRL.
Prerequisite: Make sure that you log in to your Salesforce account, install, and configure HyperGrid XRL. Refer to the links below for more detailed instructions. |
Procedure
Once you have configured the HyperGrid XRL, you can apply server-side filters to ensure that only particular records are displayed in the Related List view according to the use case. Let's understand how this is done in HyperGrid XRL.
Apply Conditions
As the name suggests, these records are fetched directly from the database depending upon the SOQL query that a user can build through an easy-to-use query builder.
We will work with Cases XRL examples to walk you through the steps to apply server-side filters using XRL.
Step 1: On the XRL Related List View, click on the gear icon at the extreme right and select Configure.
Step 2: On the Configuration Wizard, click on the Apply Conditions in the Field Selection tab.
Step 3: Select any field from the Available Fields from Case on the left, to which you need to apply a server-side filter.
Step 4: Filter Criteria
Choose the appropriate filtering criteria. A variety of operations are available and are displayed depending on the type of Available fields such as "contains", "equals", "is not empty," and more.
- Is equal: This filter displays the records with data that exactly matches the filter value
- Is not equal: This filter displays the records with data that does not exactly match the filter value
- Begins with: This filter displays the records with data that begins with the specified value
- Does not begin with: This filter displays the records with data that does not begin with the specified filter value
- Ends with: This filter displays the records with data that ends with the filter value
- Does not end with: This filter displays the records with data that does not end with the filter value
- Contains: This filter displays the records with data that contains the exact filter value
- Does not contain: This filter displays the records with data that does not contain the exact filter value
- Greater than: This filter displays the records with a value greater than the filter value
- Greater or equal: This filter displays the records with a value greater than or equal to the filter value
- Less than: This filter displays the records with a value lesser than the filter value
- Less or equal: This filter displays the records with a value less than or equal to the filter value
- Range: This filter displays the records with a value within a specified range
- Is empty: This filter displays the records which contain no data in the specific field and leaves out the records which have any value corresponding to the field.
- Is not empty: This filter displays only those records which contain any value for the mentioned field, leaving out all the records where the corresponding field is empty.
Step 5: Applied Conditions
- Once you choose an appropriate filter option and click on Add Condition it is added to the list of Applied Conditions. These conditions will be applied when loading the grid.
- If you want to Edit any of the Applied Conditions, under the Actions field, click on the Edit button.
- If you want to Delete any of the Applied Conditions, under the Actions field, click on the Delete button.
Step 6: Condition Filtering Pattern
Construct different logical connections among conditions using parenthesis and the words ‘AND ‘OR’. By modifying the parentheses' or logical operators' order, you can adjust the Boolean logic as necessary.
By default, multiple filters are applied for work on AND logic.
Step 7: You can apply filters to any other field as necessary, even to the fields not configured to display in the Related List view. Click Save to modify the current Related List view. In case, you need to have a separate view, click “Save As”.
Results
With the above procedure, you will be able to see a Related List view with XRL which has only relevant records to get your task done.
Check out our article on Client-side filters further and learn how server-side and client-side filters aid you in quickly finding the correct data at the right time.