- 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:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:53 AM
Hello @Servicenow de11
Don't use answer =[]; this line.
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.