- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 11:35 PM
Hello,
I have a requirement that is user selected in the catalog item variable(single line text) approval will goes to the person existing in the variable.
Please help me to achieve this.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:29 AM
Hello @Servicenow de11 ,
Use this-
and use this script -
var answer = getAnswer();
function getAnswer(){
var user = current.variables.YourRequiredField.toString();
var grUser = new GlideRecord('sys_user');
grUser.addQuery('name',user);
if(grUser.next()){
return grUser.sys_id;
}
}
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:14 AM
Hello @Servicenow de11
Glide that RITM and get the single line text variable's value, and the glide into sys_user table and glide for that variable with the name.
Then get the user_sys_id and send approval using advance method.
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:19 AM
Can you please give me the script
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:21 AM
I am using workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:29 AM
Hello @Servicenow de11 ,
Use this-
and use this script -
var answer = getAnswer();
function getAnswer(){
var user = current.variables.YourRequiredField.toString();
var grUser = new GlideRecord('sys_user');
grUser.addQuery('name',user);
if(grUser.next()){
return grUser.sys_id;
}
}
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.