UI macro for Assignment Group.

Subhojit Das
Kilo Guru

Hi folks,

I want a UI macro infront of Assignment Group field in Incident Table. when I click on the icon, it should show me the list of Support group of Business Service and Configuration Item selected in the same record. After getting the list, I should be able to select the support group and push that value in Assignment Group field.

 

3 REPLIES 3

Harsh Vardhan
Giga Patron

you have to use glide record inside the ui macro to get the desired result. 

 

for reference you can refer the below article. and check for "add_my_group" macro script. give a try. 

 

https://www.servicenowguru.com/system-ui/ui-macros/add-me-ui-macro-user-group-fields/

 

 

Ankush Jangle1
Kilo Guru

Hi Folks,

 

1)you need to use UI Macro.

2)

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<img src="book-icon.png" style="width:25%;height:25%" onclick="incidentList()" title="Show Incident List"></img>

<script language="javascript">
function AssignmentGroupList(){

var name=g_form.getValue("assignment_group");
var query="assignment_group="+name;
var gdw=new GlideDialogWindow("show_list");
gdw.setTitle('Incidents');
gdw.setPreference('table', 'incident_list');
gdw.setPreference('sysparm_view', 'default');
gdw.setPreference('sysparm_query', query);
gdw.render();
}
</script>

</j:jelly>

 

Please Mark it is helpful/Correct if it help you

Regards

Ankush

Hi Ankush,

If I click on the UI macro which will be visible beside Assignment Group field and it should show me the support groups of selected Configuration Item and Business Service of the Incident record.How can I achieve it?