Column Header Searching on a Data Table in the ServicePortal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2024 12:53 PM - edited 03-22-2024 08:15 AM
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.
Attached is the update set with the configured data tables. If you found this helpful, please go ahead and mark the article as helpful.
- 3,041 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2024 12:55 PM
Awesome!! Thanks Max

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 06:10 AM
Great! Thanks! It would require some more work for string fields that are set as choices (which is often encountered ie 'Category' field on incident) so it retrieves sys_choice record (similar to choice fields) but not run for example 'categoryLIKEhelp' because it will not find anything in that case. But yeah could be even more cases where it depends on the dictionary configuration where certain operators don't work but other does.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 07:36 AM
Actually, I have a new version that handles that! I take the value that is input, query the choice table based on the inputted text and table, along with the actual field to filter down and return that value. Along with integer and decimal fields, further testing showed that those needed adding, which I have done. I will post an updated code soon!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 08:37 AM
Hi @maxmorganti @febailey @Vladimir Chere1 can you please help me this widget is working fine untill there is a new reference field which is referencing to another table
can you please help me with the exact code where should i change to solve this problem ,in the attached screenshot
assigned to field is reffering to aisa_ui_action this table
and it is showing like assigned.to.null
where should i change in the below server script or in the client script