How to delete the "u_" on creating a custom table

Nakata1
Tera Contributor

Hi All

Is it possible to create a custom table without "u_" when creating a table?

find_real_file.png

Regard

5 REPLIES 5

naveen_kumarhr
ServiceNow Employee
ServiceNow Employee

Through background script this possible, use below example script 

example script : 

var table_name = 'cmdb_ci_gcp_label', table_label = 'Google Label',
extends_table = 'cmdb_ci';
var attrsList = new Packages.java.util.HashMap();

var fieldName1 = 'Value';
var ca1 = new GlideColumnAttributes(fieldName1);
ca1.setType('string');


var fieldName2 = 'Project Id';
var ca2 = new GlideColumnAttributes(fieldName3);
ca2.setType('string');
ca2.setUsePrefix(false);


attrsList.put(fieldName1, ca1);
attrsList.put(fieldName2, ca2);

var tc = new GlideTableCreator(table_name , table_label);

tc.setColumnAttributes(attrsList);

if(typeof extends_table != 'undefined') tc.setExtends(extends_table);

tc.update();

 

Mark correct/helpful based on impact.

Thanks,

Naveen