- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2019 04:33 PM
Hello community.
I would like to get the value from referenced field and display it as default value to the variable of record producer.
For example, I set default value to variable of record producer as below to get the 'name' value from user table .
And then I can confirm that the variable has 'name' value as default value on the portal.
However, I can't get the value 'department'.
Even if the same setting is made(gs.getUser().getRecord().getValue('department')), the department value cannot be obtained.
I appreciate if you could answer it.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2019 07:35 PM
try now.
javascript:gs.getUser().getRecord().getDisplayValue('department')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2019 07:33 PM
Hi, yes, you're getting the value of the department of the logged in user through the method I mentioned.
That is the value, the sys_id, which...when set as the default value for a reference field that points to department will show you "Customer Support", just like in your screenshot.
Currently, it seems like you have a string field that you are trying to put this in...and you want the DISPLAY VALUE, not the value, but the display value.
I'm saying...if you know that that field will hold a department, then make that field a reference to the departments...simple as that. Not a string field...
Please mark reply as Helpful/Correct, if applicable.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2019 05:16 AM
Hi,
I'm glad you found the answer you were looking for. What I was trying to do was get you to use the field, correctly, in my opinion. If that field is always expecting a department...then make it a reference field to the departments. That allows for a more "complete" process as you're getting values that are still in the system (for any reporting needs), ITIL users are able to preview that field and get any other information that may be relevant (such as a description or manager, etc.) and other platform specific reasons. But...in the end, it's your requirements and I'm glad you got it figured out!
Take care!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2019 10:48 PM
Hello.
Thank you for your information and corporation.
It was helpful for me.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2019 07:35 PM
try now.
javascript:gs.getUser().getRecord().getDisplayValue('department')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2019 07:38 PM