Orchestration Issue - Checking to see if user is Memberof a certain group in workflow

Wendy Peterson
Giga Guru

I have a Orchestration Query that checks to see what groups the member are in - Then there is an IF Statement that is supposed to look and see if they are a member of the group that is in that Var CI field. If they are it's supposed to return

 a YES - if not then a NO but it stopped working. Any ideas?

 

var ci = current.configuration_item.u_security_group_support;
//gs.log(ci,'Sept2');
workflow.scratchpad.output = data.get(61).output.toString();
//gs.log(workflow.scratchpad.output,'Sept2');
if(workflow.scratchpad.output.indexOf(ci)>-1){
    answer = 'yes';
}
else{
    answer = 'no';
}

 

1 REPLY 1

James Chun
Kilo Patron

Hi @Wendy Peterson,

 

If it stopped working, I would recommend checking what has changed recently.

 

If the above script was working previously and no changes were applied to the script, the most plausible cause would be the data.get(61).output.toString().

When you use the Toggle script tree and fetch the output from the required activity, is the number still 61?

JamesChun_0-1724194423666.png

 

Cheers