- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 11:58 PM
Hi,
I have a requirement to add Assignment group field whenever I click on create incident option from form context menu. IT displays a UI page. I am able to show the field but could not get the options like we get for assignment group field in normal forms (reference to Group table). I have written the below codeby which I am able to fetch the assignment group from the record but not getting all the options of group table:
<j:if test="${sysparm_action == 'incident'}">
<div class="row form-section">
<div class="col-sm-3 section-title-top">${gs.getMessage('Assignment Group')}</div>
<div class="col-sm-5">
<g:evaluate var="jvar_property">
var grList = GlideChoiceList.getChoiceList('sys_user_group','name');
</g:evaluate>
<select id="group" class="form-control" name="group" aria-label="group">
<g2:options choiceList="$[grList]" choiceValue="$[secInc.assignment_group.name.toString()]" />
</select>
</div>
</div>
</j:if>
What approch should I follow to get the record of sys_use_group table as a reference/option in my field?
thanks,
Gazal Varshney
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2020 02:52 AM
<g:macro type="text" name="REQUIRED" label="REQUIRED" value="" onkeyup="" onchange="onChange('${jvar_name}');" onclick_label="" mandatory="false" size="" style="" readonly="false" maxlength=""/>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2020 12:01 AM
you can use g:ui_reference tag.
example:
<g:ui_reference name="group" id="group" table="sys_user_group" query="GOTOnameSTARTSWITHHelp" completer="AJAXTableCompleter" ng-model="group"/>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2020 12:03 AM
refer the doc link for further details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2020 12:04 AM
Hi ,
use below code :
Assignment Group :<br/>
<g:ui_reference label="Name" name="Assignment Group" table="sys_user_group" field="name" /> <br/>
Kindly mark helpful and correct if it works.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2020 01:06 AM
Hi Harish,
Please help me in making this field mandatory.
Regards,
Gazal varshney