Default value for a variable in Service Catalog variable set from User table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2018 11:31 PM
Hi,
I have two variable in a service catalog variable set which has to display user's phone number and department on loading catalog item. I need to set the default value. How do I do it?
Thanks,
G Balaji
- Labels:
-
Cost Management
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2018 11:38 PM
You can write catalog client script for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2018 11:45 PM
Hi Balaji,
You can set default values for your variables in variable set in variables default value tab.
Example :
javascript:gs.getUserID();//will set logged-in user
javascript:gs.getUser().getCompanyID();//logge in user's company
javascript:gs.getUser().getManagerName();//Logged in user's manager
javascript:gs.getUser().getEmail();// Logged in User's email id
Thanx
Mark if helpul
Ajay
www.dxsherpa.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 07:44 AM
I had used the above script, but based on Requested for, am able to populate only department.
The other values are not getting populated.
I am getting blank output.
Values are present in phone etc.
Please help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2018 08:10 AM
Hi Ajay,
Thanks for your response.
How do I get the phone number? what is the function-call for phone number?
Regards,
Balaji G