Get assignment group in workflow script

Nawal
Mega Guru

Hi, 

i m trying to retrieve the assignement group related to the choice selected in the catalog item.

with this script in a task activity : 


var a= current.variables.la_reclamation_concerne.getDisplayValue();

//gs.log(a,'aaaa'); ==> good value.

var getag=new GlideRecord('u_sctask_assignment_socle_open'); ==> for every choice, an assignment group is dedicated in this table.

getag.addQuery('sys_id',a);


//gs.info("Field value iss "+getag.u_recl);

getag.query();

if(getag.next())

{

task.assignment_group=getag.u_assignment_group_open;

}

the variable in the catalog item : la_reclamation_concerne : "Lookup select box"

 

Any Idea why it s not working?

 

Thank you for your help

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

It works with this :  getag.addQuery('u_recl.label', a);

thank you for your help

View solution in original post

18 REPLIES 18

It works with this :  getag.addQuery('u_recl.label', a);

thank you for your help

yes, exactly thats what i said. since you are comparing earlier with sys_id while you are having a value, it was not giving you results.

Mark the comment as a correct answer if it has helped to debug the issue.

SNUG AM
Tera Guru

u_sctask_assignment_socle_open --> validate these group exist or not  -- "Base de données DB2"

 

and in gs.info in the loop to see whats return value gs.info("Return AG -- " getag.u_assignment_group_open.getValue());

It works with this :  getag.addQuery('u_recl.label', a);

thank you for your help