What I particularly like about ServiceNow is that there are plenty of features to discover even after many years of exposure to the product. Not long ago I stumbled upon a global out-of-box UI Action named Search that dated back to February 2008 and strangely contained no script, no condition, no action name – no nothing. The only hint was a comment that read: Search button on our search screens. Search screens? Honestly, I had never heard of them before. Although Wiki makes mention of this feature in Introduction to Searching and Administering Applications and Modules, the information provided is too scarce to catch the readers' attention.
In essence, appending _search to the name of any table (e.g., sys_user_search.do) will take you to what looks like a normal form for that table, though with a few important differences:
- No form UI actions (except the Search button)
- No mandatory fields
- No read-only fields
- No default values
- No hidden fields
- Dropdowns instead of checkboxes (in order to differentiate false from not selected)
In other words, the form that is normally used for inserting, updating or viewing individual records turns into an advanced search form. Instead of scrolling up and down the endless list of fields in the condition builder, all you have to do is fill in a couple of fields on a familiar form, press the Search button and – voila! – you have the filtered list you were after. Isn’t that a good time-saver? Yes, it is, though as usual there are some trade-offs to bear in mind:
- No contains or equals search (starts with is the default and only operator for text fields)
- You cannot search for an empty value or --None--
- Due to reference qualifiers, you cannot search for values that are not normally selectable in a given reference field.
Nonetheless, the feature seems to be quite handy. From my own experience, there are a number of situations where it really helps:
- When working on a multi-language instance, it is impossible to remember the localized labels for all fields. With the search screen feature, there is no need to first look the label up on the form and then go back to the list to do a search.
- Sometimes people right nasty client scripts that dynamically change field labels on the form. As a result, trying to find the field in the list filter can drive you crazy. With search screens, however, you do not have to worry about it at all.
- And last but not least, search screens seem to be the quickest way to explore the form layout as no fields are hidden. Unlike form layout configuration page where you have to switch between form sections, on a search screen you have the entire form at your fingertips.
I am sure you will find your own use cases. Do not hesitate to share them in comments!