How to populate title of user for variable in record producer?

Kruthik M Shiva
Tera Contributor

Hi,
I have a requirement where I need to populate logged in user title to the title variable based on the user logged for the record producer. For that I have added code in the default field the requested by field is getting populated, but I am not getting for Title field please do help if anyone have pointers on this. Anything needed to be change in default value code means please do share.

PFB Screenshots for reference.
Thanks in advance

1 ACCEPTED SOLUTION

Hi @Kruthik M Shiva,

 

It seems Title is populated in Title variable. Make sure your variable is of Single line text type instead of reference.

 

Thanks,
Sagar Pagar

The world works with ServiceNow

View solution in original post

5 REPLIES 5

Sagar Pagar
Tera Patron

Hi @Kruthik M Shiva,

 

Try this in default value as -

javascript:gs.getUser().getRecord().getValue('title');

 

For reference - User Object Cheat Sheet 

 

Thanks,
Sagar Pagar

 

The world works with ServiceNow

Hi @Sagar Pagar ,
I tried still not getting populated can You please tell any other solution to work.

Hi @Kruthik M Shiva,

 

It seems Title is populated in Title variable. Make sure your variable is of Single line text type instead of reference.

 

Thanks,
Sagar Pagar

The world works with ServiceNow

Hi @Sagar Pagar ,
I have changed the type of the variable but I got like this.