- 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
03-06-2019 08:58 PM
I Tried this also current.v_members.getDisplayValue() in UI Action it is showing current is not defined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 06:42 AM
Hi Rajasekar
That is leading me to wonder, if you are using the correct value (maybe it has changed or it is a new variable?) - for the variable "v_members". Check to see if the value is exactly the same as you write in the script.
Also, check these link, that might help you.
https://www.servicenowguru.com/system-ui/ui-actions-system-ui/client-server-code-ui-action/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 08:54 PM
Thank you so much Jesper,
Finally i am able to fetch Display value below is the code.
When i tried with current.v_members.getDisplayValue()i am getting Undefined error
This is working now current.variables.v_members.getDisplayValue()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2021 03:02 AM
In point 3. How to get the display value of the gr?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 10:34 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.