Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Increase Table->Column Name length to 50 chars from Glide script. Default column name allowed seems to be 30 chars.

chandra mohan
Mega Contributor

Hi ,

Can you help me with code , to increase Table->Column Name size to 50 chars from Glide script. Default column name allowed seems to be 30 chars.  I have column name as 'rf1_assignment_group_prior_failure_rate' , when creating from script it truncates to 30 chars as 'rf1_asgmnt_grp_r_failure_rate'. 

 

var attrs = new Packages.java.util.HashMap();

var column_name="rf1_assignment_group_prior_failure_rate";

var column_attributes = new GlideColumnAttributes(column_name);
column_attributes.setType(string);
column_attributes.setUsePrefix(false);
attrs.put(column_name, column_attributes);
var table_create = new GlideTableCreator("abc", table_name);
table_create.setColumnAttributes(attrs);
table_create.update();

Thanks,

6 REPLIES 6

Hi Mohan,

why would you like to create columns from script? It is not recommended

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur, 

This is required as part of packaged solution, that will need to be deployed on multiple instances. Thanks.