Need one page to search all scripts - IDEAS?

troyp
Giga Contributor

I can't be alone. You know it is out there. A chunk of script buried somewhere in the system. You've seen it, you may have even modified it. But where, oh where has it gone?

Can someone help me figure this out. I'm not sure how to implement it: complex filter, ui page, etc.

Check this out?
https://demo10.service-now.com/sys_dictionary_list.do?sysparm_query=internal_type%3Dscript%5EORinter...

There are 111 fields that are either type script or script_plain. That's a lot of places to LOOK.

I'd like to have a single page that has a search box that searches all those fields using "CONTAINS", then returns the table, name, script, active, updated columns.

Sure I know we can use the list views for common script locations. I've used it for business rules, client scripts, and ui actions separately.

Here is an example searching for business rules with "getDisplayValue":
https://demo10.service-now.com/sys_script_list.do?sysparm_query=scriptLIKEgetDisplayValue

Would that need to be a ui page with jelly to loop over the table types, then include the list view of each result? Any thoughts?

I'd like to create the module and put it in the system definition application on the left-nav visible to administrators.

8 REPLIES 8

john_roberts
Mega Guru

What about Global Search? There's already a "Policy" search group that covers some of the script types.


troyp
Giga Contributor

Nice.

See I knew I couldn't have been the first one to long for something like that. GREAT!
Any idea why is is searching for complete tokens? For example search for getDisplayVal won't match anything but getDisplayValue does find matches. I'm old-school longing for grep -r regex *.js


When you mention global search ...
That brings me back to an earlier question. I'd love to equip our help desk with the ability to use global search, tag related records, and create either an incident or a request.

Create Incident from Prior Art - Global Search


You can use wildcards for partial matches (getDisplayVal*).


Perfect. Thank you.