HR Service Record Producer Variable Not Showing Up in Item's Description

Jim Kerrigan
Kilo Expert

I have defined several single line text variables in the record producer for an HR Service.

Some are mandatory, some have default values, some are neither mandatory or have a default value.

On the AVAILABILITY tab, I have selected "Send to item's description" for each of these variables.

However, not all appear in the HR Case "Description" field.

I see no clear pattern for which appear and which do not.

Comments, suggestions, and solutions welcome.

 

1 ACCEPTED SOLUTION

Kiel Sanders
ServiceNow Employee
ServiceNow Employee

Hi Jim

This is all defined in the _getDescriptionFromAnswers method in the hr_CaseUtils script include.  I'd recommend reviewing the logic of how these are populated to see if anything jumps out at you.  I don't recommend changing this script include but it can be helpful for troubleshooting.

The only conditions I can think of that would cause certain fields to be excluded would be if the values do not change and remain as the defaults.  There is logic in the script to look exclude values that have not changed from the original values.

If that doesn't work, I recommend creating a HI incident to help with troubleshooting.

View solution in original post

7 REPLIES 7

giuseppem
Kilo Sage

Hi Jim

I have a similar problem, but I can't find in AVAILABILITY tab the "Send to item's description" option.

Can you help me?

Regards

I see the field on a Jakarta Patch 8 instance but do not see it on a Kingston Patch 3 instance.

Jim Kerrigan
Kilo Expert


It seems that a record producer variable will only show up in the HR Case "description" field if its value changes from its original value.

Furthermore, if your variable name matches a variable name in the SN_HR_CORE_PROFILE table, then the value of that profile field is used as the original value for your variable.

That is, if you name your record producer variable "last_name", then it defaults to the value of "last_name" field in the associated profile record.

It'll appear in the HR Case "description" field only if the user changes the value of your record producer variable to something other than the value of the corresponding variable in the associated profile record.

The code that performs these actions is in the "_getDescriptionFromAnswers" function in "hr_CaseUtils" Script Include.

Since 'last_name' field name on the Record Producer is matching with the 'last_name' field name on SN_HR_CORE_PROFILE table and the value entered for last_name in the Record Producer is not matching with the value for last_name in SN_HR_CORE_PROFILE table, the script is appending ' (' + gs.getMessage('original value: ') + originalDisplayValue + ')'; to the last_name in the "description".

The HI Engineer on the Incident ticket raised on this issue was able to reproduce this behavior in OOTB Jakarta Patch 8 and Kingston Patch 4 and suggests avoiding OOTB profile table field names in HR Record Producers.

As far as I can tell the behaviors that only changed variables show up in the "description" field and default values derived from the profile record are both undocumented.