Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to add multiple reference qualifier

samarasinghe
Kilo Contributor

Hi,

 

I have to use multiple reference qualifiers in a field. How an I use multiple reference qualifiers in a field.

My two reference qualifiers are listed below.

1. javascript:new global.PopulateValidTasks().getTasks();

2.sys_class_name=incident^ORsys_class_name=sc_req_item^ORsys_class_name=sc_request^ORsys_class_name=sc_task^sys_created_on>=
javascript:gs.dateGenerate('2021-01-01','00:00:00')^EQ

 

and this is the field I am trying to apply above two reference qualifiers.

find_real_file.png

 

This is the code used in script include PopulateValidTasks()

var TaskRecords = [];
var gr = new GlideRecord('u_service_information');		
gr.query();
 while (gr.next()) {
            TaskRecords.push(gr.u_task.toString()); 

 }
 return 'sys_idNOT IN' + TaskRecords.join();

 

Please give some suggestions how to combine these two reference qualifiers and apply it to this field.

1 ACCEPTED SOLUTION

palanikumar
Giga Sage
Giga Sage

You can try this

javascript:"sys_class_name=incident^ORsys_class_name=sc_req_item^ORsys_class_name=sc_request^ORsys_class_name=sc_task^sys_created_on>="+gs.dateGenerate('2021-01-01','00:00:00')+"^"+new global.PopulateValidTasks().getTasks();

 

Thank you,
Palani

View solution in original post

1 REPLY 1

palanikumar
Giga Sage
Giga Sage

You can try this

javascript:"sys_class_name=incident^ORsys_class_name=sc_req_item^ORsys_class_name=sc_request^ORsys_class_name=sc_task^sys_created_on>="+gs.dateGenerate('2021-01-01','00:00:00')+"^"+new global.PopulateValidTasks().getTasks();

 

Thank you,
Palani