logo

NJP

How to find your code with MS CodeSearch

Import · Oct 23, 2018 · article

Yesterday I uploaded a new CodeSearch application to the share: MS CodeSearch.

The application is based on the sn_codesearch application provided by ServiceNow which is also used in the studio search.

I appreciate any kind of feedback. You can comment this article or leave a comment/rating at the share. If you implement features by your own, please share them with us so that we can integrate them into the application.

Usage:

The app is available for admins from the application menu:

image

You can input your search term and search for the code in predefined tables (see configuration).

image

You can then open and close the matchings. This is possible on table (1) and record (2) level. You can easily see the number of matching records and matching lines within a record.

image

The scripts are provided with the line numbers and syntax higlighting.

Configuration:

You can configure the tables and fields which should be searched in. Therefore you have to add/modify the entries in Code Search Tables (sn_codesearch_table).

All records for the Search Group "x_msgfi_codesearch.MS CodeSearch" are used by the Search application.

image

To add your custom tables/fields you can have a look at the method x_msgfi_codesearch.MS_CodeSearch().addAllTables(). This will add tables and fields with condition or script fields.

Hope you like it!

Regards

Sebastian

View original source

https://www.servicenow.com/community/now-platform-articles/how-to-find-your-code-with-ms-codesearch/ta-p/2296647