Column Header Searching on a Data Table in the ServicePortal

maxmorganti
Tera Contributor

Hello, this article is to help inform people of how to build column heading searching on the data table widget in the ServicePortal. The searching works just like it does on the backend tables with a slight variation.

 

The searching automatically does a contains search on most fields, it even works on List field types. To search, all you need to do is input your value and hit the enter key. The table will then filter down to the specific records defined in your search.

 

You can search multiple fields at once. It will also take into account the predefined filter on the data table. Resetting it is a little tricky, so there is a reset filter button on the top of the widget. However, if you are only searching on one field at a time, clearing out the value and hitting enter will also reset the table to no filter, or the predefined filter if there is one.

 

There are a few caveats to this. For reference fields, it filters based on the display field of the table, so if there is not one, you have to go in and define that, like the user field which is done in the widget. Then integer and decimal fields cannot do contains searches, so it is an IS search. For choice fields, it searches the choice table based on the field and table, then searches the label and returns the actual backend value of the choice to filter the table. There are likely more column types that will need to be added and I will do my best to routinely update the widget download as well.

 

maxmorganti_0-1709930913508.png

maxmorganti_1-1709930949824.png

Attached is the update set with the configured data tables. If you found this helpful, please go ahead and mark the article as helpful.

5 REPLIES 5

JyotiG998108915
Tera Contributor

JyotiG998108915_0-1741878211253.png

 

Thanks! 

When I click the Reset Search button, the entire page reloads instead of just refreshing the widget. I need a solution that allows the button to refresh only the widget without affecting the rest of the page. Your help would be greatly appreciated!