Filter out values on a custom table that starts with a lowercase

Kristin K_
Tera Contributor

Good Morning,

 

Is there a way to filter out value on a custom table that starts with a lowercase? I do not want to delete them because they are need for another automation form, but for the particular one I am working on; I do not need them.

 

 

2 REPLIES 2

Samaksh Wani
Giga Sage
Giga Sage

Hello @Kristin K_ 

 

You can use background script for left out those values :-

 

 

var gr = new GlideRecord('table_name');
gr.query();
while(gr.next()){
var regexp = /^[A-Z]/;
if(regexp.test(gr.field_name)){
gs.print(gr.field_name);
}
}

 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

Will this remove the value that start with lowercase from the table? So I can add the table to the lookup select box