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

Please mark it helpful/coorect

Not applicable

Hi Balaji,

If you found the solution, please mark the answer as correct and close the thread.

Thanks in advance

PTR
Tera Expert

Hi All,

 

You can find some  useful codes to set the 'default value' for variables in the Catalogue Variable Set from the User table.

 

1. javascript:gs.getUserID();       //will set logged-in user or requester  #Type: Reference 

2. javascript:gs.getUser().getEmail();   //Logged-in User's email id  #Type: single line tex

3. javascript:gs.getUser().getFirstName();    //logged in  user' first name  #Type : single line text

4. javascript:gs.getUser().getLastName();  // logged in user' last name  #Type: single line tex

5. javascript:gs.getUser().getRecord().getValue('manager');   //Logged in user's manager  #type: Ref

6. javascript:gs.getUser().getRecord().getValue('department'); //logged in user's department  #type: Ref

7. javascript:gs.getUser().getLocation();   //logge in user's location  #type: Ref

8. javascript:gs.getUser().getRecord().getValue("mobile_phone");  //logged in user mobile num #type: single line text

9. javascript:gs.getUser().getRecord().getValue("phone");    //logged in user business phone  #type: single line text.

10. javascript:gs.getUser().getCompanyID();     //logged in user's company  #type: Ref

 

 

Please mark it helpful.

 

Thanks,

PTR

 

 

CarlosJunior
Tera Contributor

Tem como fazer um com um service_offering?