- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2020 03:53 AM
Hi,
I have created a catalog item with variables requestor, title, location, email id and phone number.
Requirements : 1) Have to auto populate the logged in user details by using the requestor variable.
2) How to change the visibility of a catalog item to itil
3) How to add the approval level 1 as - requestor manager and approval level 2 as the manager of the
application - security team.
Please help me in this regard.
Thanks & regards
Naresh Uppu
Solved! Go to Solution.
- Labels:
-
Service Catalog
- 41,607 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2020 04:10 AM
Hey Naresh,
To auto populate the logged in user details:
Add in default value to that variables : javascript:gs.getUserID()//name of logged in user.
javascript:gs.getUser().getRecord().getValue('phone_number');//phone number
javascript:gs.getUser().getRecord().getValue('location');//location
AS shown in Screen shot:
TO change the visibility of a catalog item to itil
GO to Available for
click on Edit
Select itil user.
Screenshot will help you:
For sending Approval to Requester Manager create a workflow
Drag and Drop Approval User activity.
In that advance Script write:
var answer=[];
answer.push(current.variables.u_name.manager);
u_name is field name put your requester filed name.
AS shown in screen shot:
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy.
Thanks,
Namrata

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2020 04:10 AM
Hi,
For scenario 1 you can use this-
You can create a onChange catalog client script and use this script-
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var name=g_form.getReference('requested_for_name').email;
g_form.setValue('requested_for_email',name);
var loc=g_form.getReference('requested_for_name',setLocation);
function setLocation(loc)
{
if(loc)
g_form.setValue('requested_for_location',loc.location);
g_form.setValue('requested_foe_department',loc.department);
}
//Type appropriate comment here, and begin script below
}
For 2nd scenario -
Look for Maintain items >> Name_of_standard_change & add Available for Not Available for related list option. This is on Catalog form for Standard Change & not Standard Change template form.
for 3rd scenario-
For approvals you can use Workflow for that.
Please mark correct or helpful if this helps you.
Thanks
Swapnil

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2020 04:19 AM
Hi,
You can pass the default value field of the "Requestor" variable dictionary form
javascript:gs.getUserID();
Please make it correct or mark it useful if your query is get resolved by this.