- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 04:15 PM
Hi Folks,
I have a report whose objective is to extract the information that is saved in the sc_item_option_mtom table, the detail here is that when I read the information of an already existing user in my sys_user table in the user name instead of bringing the name it gives me the sys_id of the user.
Could someone help me write a script to send the username to the report instead of their sys_id?
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 10:28 PM
Hi @AydeeH
Assuming that you are getting the sys_id of the user, you can make use of below script to get the user name :
var grUser = new GlideRecord('sys_user');
grUser.get('de24de951bd9301090b065f9bc4bcb37'); // Pass your Sys ID variable here
gs.info(grUser.name);
Please pass your user sys_id variable to this script and you can get the username into a variable for subsequent use.
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 10:28 PM
Hi @AydeeH
Assuming that you are getting the sys_id of the user, you can make use of below script to get the user name :
var grUser = new GlideRecord('sys_user');
grUser.get('de24de951bd9301090b065f9bc4bcb37'); // Pass your Sys ID variable here
gs.info(grUser.name);
Please pass your user sys_id variable to this script and you can get the username into a variable for subsequent use.
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.