How to investigate where the table is used

Ohki_Yamamoto
Tera Guru

We have created and developed custom Table A in the past on ServiceNow, but due to a change in specifications, custom Table A is no longer needed.

 

Therefore, we would like to physically delete the custom table A after confirming that it is no longer used on the ServiceNow instance.

 

Is there a way to mechanically search for the usage of custom table A (configuration by NoCode, implementation on script by LowCode/ProCode)? (Is there a ServiceNow feature like Grep for source code?)

 

I am aware that ServiceNow's global search is not able to search for all functions/source code.

 

4 REPLIES 4

Amit Gujarathi
Giga Sage
Giga Sage

HI @Ohki_Yamamoto ,
I trust you are doing great.
You can use the code search option in ServiceNow.


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



Tony Chatfield1
Kilo Patron

Hi, you should be able to use the search function in 'Studio' to identify most if not all references to the table.
Open Studio, select any application (it doesn't matter)
then select Search > Code search.
In terms enter the table name (not label) then flag Search in all applications as true.

Then run the sserach.

This should identify all references to the table with the exception of any flows that reference it,
but this shouldn't be difficult to assess manually.



Community Alums
Not applicable

Hi @Ohki_Yamamoto ,

Try using the code search in Studio. There's a checkbox to check all applications.



SandeepDutta_0-1686803424705.png

 

 

Ohki_Yamamoto
Tera Guru

Thank you very much.

 

I understand that I can search each application from the code search in studio.

 

However, these are only available in "Select a table to search...(o)". (optional)" list box?

For example, flow designer and scripted REST API are not included and cannot be searched.

Is it possible to search the entire instance including these?

Ohki_Yamamoto_0-1686887063109.png


Also, I am aware that the code search in studio searches the code implemented in the script itself. Am I right in thinking that the code search in studio searches the code implemented in the script itself?


For example, if "sys_attachment" is set in the trigger table of a business rule, the target business rule cannot be searched for "sys_attachment" in the code search of "studio".


Is there a way to search for such a NoCode setting?