Catalog Script/ Background query

Wade Clairmont
Tera Guru

Trying to build a query to return some Owner values from a custom table populated with text value network folders in catalog script.

WadeClairmont_0-1726248651855.png

When I try the query in the background query builder:

var test = "J:\IT Management\Ar" ;
var gr = new GlideRecord('u_network_folders');
gr.addQuery('u_ntwk_folder', 'STARTSWITH', test);
gr.query();
while (gr.next()) {
    gs.print(gr.u_primary_onwer);
}
it finds nothing and I know the records are there in the table. This used to work, as I would have built the query in there during dev back in 2020.
 
Did something change in Vancouver?  any thoughts?

 

 

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

You are probably encountering the slash as an escape character - not sure if this is true within a string.  Try

 

var test = "J:\\IT Management\\Ar" ;

 

View solution in original post

1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

You are probably encountering the slash as an escape character - not sure if this is true within a string.  Try

 

var test = "J:\\IT Management\\Ar" ;