How to Fetch Conditional Data from UiPath Data Service using UiPathApps CustomHTML and Table Control

How to Fetch Conditional Data from UiPath Data Service using UiPathApps CustomHTML and Table Control?

Issue Description:

While fetching data from an UiPath Data Service entity, there is a limitation of only 1000 records that can be fetched at a time. In this scenario, how do we fetch required records based on a condition, so that we get only those records which match a filter criteria set by the user using UiPath Apps CustomHTML and Table Control?

Resolution:

1. Let us say there is a Data Entity by Name TPEmployee1

2. Create a new UiPath App

3. Add the Data Entity to the App

4. Create an App variable

5. Add the Entity. In the example below, the Entity Display Name is TP_Employee, and Entity Name is TP_Employee1

6. Add a CustomHTML control

7. Click on Open code editor

8. Add the below code in HTML section

<div class="textContainer">
  <input type="text"/ id="searchText">
  <button onClick="searchEmplyee()">Search</button>
</div>
9. Add the below code in the CSS section
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans");

.textContainer {
height: 100%;
background-color: #ffffff;
font-family: 'Noto Sans';
font-size: 14px;
color: #333333;
display: flex;
align-items: center;
justify-content: center;
}

10. Add the below code in JAVASCRIPT section and click Save
function searchEmplyee() { 
  let searchText = document.getElementById("searchText").value;
    App.setVariable('var_searchName', searchText);
}
Example:
10. Add a Table
111. Click on Open Resources for Data source and choose Query Builder
12. Choose Source and Select the TPEmployee1 (or your own table) and click on Add Condition and choose the field (Name or your own field) and the condition (contains or your own condition) and the App variable and click on Save.
13. Preview the App
It will show the data as below
14. Enter the name for filter condition in the Text Box and later click on the search button.
The results will be filtered as below