Search results

How to apply filter in Grid widget based on your list of keywords?

Please follow the steps below to apply the filter for any column based on multiple keywords,

  • Create the table in your SQL server to store the list of keywords to be filtered,

    Word Bank

  • Create a custom function in the SQL server to determine if the value of a column contains any of the words found in a table of keywords.

    Custom Function

If the @searchWord contains any of the words in the Keyword table, it will return as ‘1’; otherwise, it will return as ‘0’.

NOTE: You can customize this logic according to your specific requirements.

  • By using the custom function that has been created, you can create the expression shown below in our Dashboard Designer,

    Expression With Custom Fucntion

  • Configure the created expression column in the widgets. The Expression column should be added to the Hidden Column section of the Grid widget.

    Grid with Expression

  • Apply the filter to the Expression column based on the values 0 and 1.

    Filter Window

Here, 1 represents the column value that contains the filter words, and 0 represents the column value that does not contain the filter words.

Before applying a filter in the Grid widget,

Before apply filter

After applying the filter in the Grid widget,

Before apply filter

NOTE: In this approach, you do not need to modify the expression. You simply add the new word to your Keyword table alone.