Reference qualifier with catalog item

Priya75
Tera Contributor

Hi All,

 

I have a variable. name "ABC" it's a choice list, and another variable which is a List collector name "BCD". So variable BCD depends on ABC variable.

 

So I have used a reference qualifier in BCD variable.

 

javascript   new ScriptIncludeName.FunctionName(current.variables.u_bcd);

 

The script include is client callable and when i checked it is coming as empty. any idea how can get desired values..

 

 

 

 

12 REPLIES 12

Harish KM
Kilo Patron
Kilo Patron

Hi @Priya75 can you share your script include here

Regards
Harish

FunctionName : function(value){
gs.info("value"+value);

var list1=[];
var list2=[];
if(value=="Public")
{
var ga=new GlideRecord("incident");
ga.addQuery("value", value);
ga.query();
while(ga.next()){
list1.push(ga.getUniqueValue());
}
return "sys_idIN"+ list1; 
}

Hi @Priya75 can you try below script

FunctionName : function(value){
gs.info("value"+value);

var list1=[];
if(value=="Public")
{
var ga=new GlideRecord("incident");
ga.addQuery("value", value);
ga.query();
while(ga.next()){
list1.push(ga.getValue('sys_id'));
}

gs.info(list1.join(','));// can you share this log
return "sys_idIN"+ list1.join(',');
}

Regards
Harish

Anurag Tripathi
Mega Patron
Mega Patron

are you getting the log?

Variables dont have to start from u_, so Can you confirm that the variable name you are using is right.

-Anurag