Default value for a variable in Service Catalog variable set from User table

G Balaji
Kilo Guru

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

13 REPLIES 13

Bhagya Lakshmi
Mega Guru

You can write catalog client script for this.

Not applicable

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

find_real_file.png

www.dxsherpa.com

anjumb
Tera Contributor

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.

G Balaji
Kilo Guru

Hi Ajay,

Thanks for your response. 

How do I get the phone number? what is the function-call for phone number?

 

Regards,

Balaji G