- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2023 11:12 AM
I have a variable on my record producer that I want to default to the current logged in user's name. I have it set up to default, but I can't get it to show in the case description after submission. Is there a way to do this?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2023 03:08 PM
Hi,
Good question and I'm just pointing to the documentation, but after looking at the actual scripts related to this, it appears that there's just 4 that are ignored: opened_for, priority, short_description, description. So other variable names may actually end up in the description of the case.
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
02-27-2023 11:31 AM - edited 02-27-2023 11:32 AM
Hi,
If you don't mind, can you clarify if you're saying that other variables are showing up in the case description, but not the one you set the default value for? Or are the variables showing up, to include the field you set the default value for...it's just that the value isn't show up?
There should be a line, something like this in your HR record producer that would create the case from the record producer and during that process, take the variables and put them in the case description per settings:
new sn_hr_core.hr_ServicesUtil(current, gs).createCaseFromProducer(producer, cat_item.sys_id);
It's unclear as you have some fields censored out (for obvious reasons, but it added some confusion).
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
02-27-2023 11:42 AM
Sorry, I should have been more clear. The entire field isn't showing up in the description. I want it to say "Donator- Employees Name" but there isn't even a line for Donator.
All of my other variables and their values are showing up fine.
I do have this code in my record producer:
new sn_hr_core.hr_ServicesUtil(current, gs).createCaseFromProducer(producer, cat_item.sys_id);
current.subject_person = producer.subject_person.user;
current.opened_for = producer.opened_for_profile.user;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2023 01:13 PM - edited 02-27-2023 01:13 PM
Hi,
Per documentation, since you've named the field "opened_for" which matches an HR case field, the logic is to skip that and not add it to the description: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0993578
You can change the variable name and it should work as you'd like or...you can change the behavior of the process to add it to the description even if it matches an HR case field, but I wouldn't recommend that.
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
02-27-2023 01:54 PM
That makes sense, but why does my subject_person field show up in the description?
I just can't change the name because I have a catalog client script that uses the opened_for user to populate another field on the RP.