How can I list all closed incidents showing Resolved By not a member of the Resolved By Group?

JLeong
Mega Sage

Good day!

How can I list all closed incidents showing Resolved By not a member of the Resolved By Group in Flow Designer?

I need to update all closed incidents with mis matching Resolved By and Resolved By Group. Resolved By Group should be a group that Resolved By is a member of.

The updating part in Flow Designer is easy but I need to list the records first.

Thank you in advance.

Regards,

Jocelyn

 

 

1 ACCEPTED SOLUTION

Hi JLeong,

I created it to demonstrate.  Here's the basic definition:

find_real_file.png

And here's where I define the join

find_real_file.png

When you structure your query in Flow Designer, filter on state = 6 (resolved) and grmem.user is null/empty.

 

:{)

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

View solution in original post

7 REPLIES 7

Chavan AP
Kilo Sage

hey

1. query incident table

2. get all the resolved incident along with resolved by

3. for each resolved by query group member table

4. then update incident with respective group

 

regards

aj

Glad I could help! If this solved your issue, please mark it as ✅ Helpful and ✅ Accept as Solution so others can benefit too.*****Chavan A.P. | Technical Architect | Certified Professional*****

Hi Ajay,

I appreciate your response. I was able to do this in Flow Designer, but I need a list first before updating.

Regards,

Jocelyn

 

Jaspal Singh
Mega Patron
Mega Patron

Hi,

 

Can you try using below script in background script.

var agis;
var usis;
var inciis=new GlideRecord('incident');
inciis.addQuery('number','INC000001'); //Try for 1 record of incident
inciis.query();
while(inciis.next())
{
 agis=inciis.resolving_group; //replace resolving_group with appropriate field name
 usis=inciis.resolved_by;
 var usrmember=new GlideRecord('sys_user_grmember');
 usrmember.addQuery('user',usis);
 usrmember.addQuery('group',agis);
 usrmember.query();
  if(usrmember.next())
   {
    //gs.print('Yes');
   }
else
{
gs.print('Number is '+inciis.number);
}

}

 

Thanks,

Jaspal Singh

 

Hit Helpful or Correct on the impact of response.