: UI Builder Search Functionality Not Fetching Results with Client Parameter in Incident Table

AyanshN
Tera Contributor

Hello ServiceNow Community,

I am currently working on UI Builder where I am implementing a search functionality using Client Parameters to filter data from the Incident table. I am using a edit filter condition inside Data Resource to fetch the records based on search input, but I am facing an issue where search results are not being fetched properly.

My Scenario:

I have applied the following search conditions in the Data Resource filter:

  • caller_id IS NOT EMPTY

  • short_description CONTAINS @STate.searchTerm

  • number CONTAINS @STate.searchTerm

Additionally, I have also configured the Search event with the following steps:

  1. Update Client Parameter:

    • @payload.searchTerm

  2. Refresh Data Resource:

    • data.refreshData()

What is Working:

  • The state.searchTerm parameter is updating correctly (I verified it using console logs).

  • Data is visible when no filter is applied.

  • Manual search through the list in the backend shows that matching records exist.

What is Not Working:

  • When I perform the search using short_description or number, no results are returned.

  • Aggregation using GraphQL with the same conditions also returns zero counts.

My Questions:

  1. What are the correct conditions for search functionality in UI Builder?

  2. Is there any special configuration required to filter data using CONTAINS with Client Parameters?

  3. Does GraphQL or Data Resource require any additional handlers to refresh search results properly?

Any help or guidance will be greatly appreciated!

0 REPLIES 0