- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2015 07:53 AM
I'm creating a catalog item to ask the submitter what group they want a user added to. I have it working except it returns the sys_ID of the group to the Incident summary field. How do I convert this to the group name?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2015 10:01 AM
Hi , if you set the group's name as Display value then getDisplayValue() is the solution for you or you can try var gr = new GlideRecord('sys_user_group'); if (gr.get(groupID))// add group ID here { // gr.name returns group's name }

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2015 07:56 AM
Hi Tim,
Use getDisplayValue() to get the display value of the group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2019 02:42 AM
Hi I am unable to fetch the List Collector Display value from Client Enabled UI Action, i have tried the below code but no luck.can anyone help me on this.
1.g_form.getValue('v_members'); showing sysid not display value.
2.g_form.getDisplayValue('v_members'); not showing anything.
3.gr.getDisplayValue('v_members); gr is not defined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 10:35 PM
I am trying to Fetch the variable and include UI Macro Button on fiedl.can any one help me on this
function onLoad() {
try{
var field ='v_members';
var field = g_form.getControl(field);
$(field).insert({
after: '<a onclick="doSomething()" name="my_custom_macro" id="my_custom_macro"><img src="images/warning.gifx" alt="Show Macro" title="Show Macro" style="padding-right:4px"></a>'
});
}
catch(e){
alert('Error');
}
}
//onclick event to fire when the image is clicked
function doSomething() {
alert('You clicked me!');
}
I am getting undefined error. 'V_Members' is a variable type List Collector.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2015 10:01 AM
Hi , if you set the group's name as Display value then getDisplayValue() is the solution for you or you can try var gr = new GlideRecord('sys_user_group'); if (gr.get(groupID))// add group ID here { // gr.name returns group's name }