Did you know that you can go directly to a table form or list from the Application Navigator?

Danny Mortense1
ServiceNow Employee
ServiceNow Employee

Did you know?

Did you know that you can go directly to a table form or list from the Application Navigator?

Well of course you can, just type the module name into the navigator filter and it will show a filtered list in the Application Navigator. OK, yes that works, but what if there is no module for your table?

In the Application Navigator filter you can type the name of the physical table name (not the label), and go directly to a list, form or the application files of that table. No kidding.

So, what's a label? Well, the label of the user table is 'User', but the actual table name is 'sys_user'. The group table has a label of Group, but the table name is 'sys_user_group'.

For example if you wanted to see a list of all of the incidents in your instance you can type incident.list into the application navigator filter. This will display a list view of all of the incidents. You can do this with any table for which you have access normally.

But wait, there is more. Here are the commands that can help you if you know the actual table name. Here is a list:

<tablename>.list                             - display a list of All <tablename> records.

<tablename>.LIST                       - display a list of All <tablename> records in a new browser tab.

<tablename>.do                             - display a form to create a new record in <tablename>.

<tablename>.form                       - display a form to create a new record in <tablename>.

<tablename>.FORM                 - display a form to create a new record in <tablename> in a new browser tab.

<tablename>.config                   - display all of the application files for <tablename>.

<tablename>.CONFIG           - display all of the application files for <tablename> in a new browser tab.

So, as a system administrator you might like to display a list of records in tables subs as 'sys_properties' or 'sys_update_xml'. There aren't any modules for these but they are useful tables to access directly.

NOTE: This is one of a series of Did you know posts by me. I will be picking random snippets of information that I feel are useful to know, but may not be common knowledge amongst newer users of ServiceNow.

If you find this information help then please let me know by making a comment and marking the post as helpful.

8 REPLIES 8

You need to switch back to UI15.

 

See: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0564460

Also see: https://docs.servicenow.com/bundle/quebec-platform-user-interface/page/administer/navigation-and-ui/...

 

With the introduction of the Next Experience (aka Polaris), I wouldn't expect UI15 to hang around much longer. Maybe NE has something like NavFilterExtension?

I am working in UI16, and from what i read it turns out they discontinued support, but if you create a new UI Script called navFilterExtensionInit with specific code within, it'll let it work:

 

API Name: navFilterExtensionInit
UI Type: Desktop

Global: True

Active: True

Script:

 

(function navFilterExtensionInitPage() {
		var elem = parent.document.getElementById('nav_west');
		if ( typeof elem === 'undefined' || elem == null )
			return;

		if ( typeof parent.msg === 'undefined'/* || !parent.msg*/ ) {
			var script = parent.document.createElement('script');
			var msgFix = parent.document.createElement('script');
			script.type = 'text/javascript';
			msgFix.type = 'text/javascript';
			msgFix.text = "var msg = '';"; //msg wasn't defined properly in the new filters
			//script.text = "javascript&colon;var msg = '';"; //stop message errors... while using the same option as before. -CR
			script.src='NavFilterExtension.jsdbx' + "?ts=" + new Date().getTime();
			parent.document.getElementsByTagName('head')[0].appendChild(msgFix);
			parent.document.getElementsByTagName('head')[0].appendChild(script);
		}
	
})(); 

 

i wanted this to be available to admins only so i added a script include and called it from the Init script...

API Name: navFilterExtensionInit
UI Type: Desktop

Global: True

Active: True

Script:

(function navFilterExtensionInitPage() {
	var ga = new GlideAjax('CheckUser');
	ga.addParam('sysparm_name','u_hasRole');
	ga.addParam('sysparm_role','admin');
	ga.getXMLWait();
	var admin = ga.getAnswer();
	if(admin == 'true'){
		var elem = parent.document.getElementById('nav_west');
		if ( typeof elem === 'undefined' || elem == null )
			return;

		if ( typeof parent.msg === 'undefined'/* || !parent.msg*/ ) {
			var script = parent.document.createElement('script');
			var msgFix = parent.document.createElement('script');
			script.type = 'text/javascript';
			msgFix.type = 'text/javascript';
			msgFix.text = "var msg = '';"; //msg wasn't defined properly in the new filters
			//script.text = "javascript&colon;var msg = '';"; //stop message errors... while using the same option as before. -CR
			script.src='NavFilterExtension.jsdbx' + "?ts=" + new Date().getTime();
			parent.document.getElementsByTagName('head')[0].appendChild(msgFix);
			parent.document.getElementsByTagName('head')[0].appendChild(script);
		}
	}
})(); 

 
Script Include:
Name: CheckUser
Accessible from: all application scopes
Client Callable: true
Active: true

Script:

var CheckUser = Class.create();
CheckUser.prototype = Object.extendsObject(AbstractAjaxProcessor, {
	u_user: function() {
		return gs.getUserID();
	},
	
	u_hasRole: function(role) {
   if(!role)role = this.getParameter("sysparm_role");
   return gs.hasRole(role);
	},
    type: 'CheckUser'
});

some of the custom filters ive created:

to goto the ServicePortal in a new tab:

if (val.endsWith(".sp")){
		var url = document.location.protocol+"//"+document.location.hostname+"/sp";
		window.open(url,"_blank");
		restoreFilterText(msg);
		return true;
	}

 

to get into the FilterExtension UI Script Easily:

	if (val.endsWith('.fc')){
		val = val.replace(/ /g, '');
		document.getElementById('gsft_main').src="sys_ui_script.do?sys_id=7595a72f0a0006d400c3a9fc993d5092&sysparm_domain=null&sysparm_domain_scope=null";
		restoreFilterText(msg);
		return true;
			
  }
	

 

to get to a table's config page easily:

	if (val.endsWith('.table')){
		//example: incident.table
		// navigates to Table Config for requested table
		val = val.replace(/ /g, '');
		document.getElementById('gsft_main').src="sys_db_object.do?sys_id=incident&sysparm_refkey=name&sysparm_domain_restore=false&sysparm_referring_url="+ val.replace('.table','')+"_list.do";
		restoreFilterText(msg);
		return true;
	}