Show only Assignment groups with the same parent

ramirch
Tera Contributor

Hello!

 

We have multiple inbound actions that create records in a custom table. Upon creation of the record, the assignment group is populated. Is there a way to transfer/re-assign the ticket to another assignment group with the same parent.

 

For example:

Inbound Action 1 - creates record and assigned to Group 1, Parent is A

Inbound Action 2 - creates record and assigned to Group 2, Parent is B

Inbound Action 3 - creates record and assigned to Group 3, Parent is A

Inbound Action 4 - creates record and assigned to Group 4, Parent is A

Inbound Action 5 - creates record and assigned to Group 5, Parent is B

 

When a ticket is created and assigned to Group 1, it can only be assigned to Groups 3 & 4. Groups 2 & 5 will not be available for selection.

 

Is this possible?

Please help!

 

Thanks!

1 ACCEPTED SOLUTION

Hi,
In the else part of code 

return "type =sys_id of the type that you want to show"

 

 


Thanks and Regards,

Saurabh Gupta

View solution in original post

6 REPLIES 6

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi,
You can write an advance reference qualifier for that.


Thanks and Regards,

Saurabh Gupta

Hi,
Script Include:

 

 

	var asgGrpWithSameParent = Class.create();
	asgGrpWithSameParent.prototype = {
	
		getAsgGrp:function(grpSysid)
		{
	if(grpSysid)
	{
	var grp=new GlideRecord('sys_user_group');
	grp.get(grpSysid);
	var parent=grp.parent+"";
	return 'parent='+ parent;
	}
	else
	{
		return "";
	}
		},

		type: 'asgGrpWithSameParent'
	};

 

 

Reference Qualifier :

 

 

javascript: new asgGrpWithSameParent().getAsgGrp(current.assignment_group+"")

 

 




Thanks and Regards,

Saurabh Gupta

Hi @Saurabh Gupta ,

This worked! Thank you.

There is one thing though. When manually creating a record, the Assignment group has no value. Is it possible to show all groups with type = customGroupType?

Yes, possible. need to change the code.


Thanks and Regards,

Saurabh Gupta