How to Force ServiceNow to show a value for a Referenced field when that field has a Blank Name?

G24
Kilo Sage

Gurus,

When I create a new "Checklist", for example from an "HR Service" record, using the dropdown button, like this:

3.jpg

 

And then I create Checklist Items, one by one, by using the "+ Add Item" button, like this:

4.jpg

 

And then I go look in the "checklist_item" table, I see the following:

5.jpg

 

The system seems to be saying that these Checklist Items are floating on their own in deep space, and NOT attached to any Checklist.  This is a lie!

 

The issue is that the Checklist, when created on the fly as I have described, was never given a name.  : (

This can be seen here:

6.jpg

 

Question:

How can I force ServiceNow to show me a value, perhaps a sys_id, but in any case SOME VALUE, other than

"(empty)", when a referenced field has No Name?  Is there a system setting for this?  Is there a hack of some kind?  Thank you!

1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

Hi Geoffrey,

If you view the Checklist table, you can set the Display column to sys_id or whatever

BradBowman_1-1700328277857.png

Note that this will always display this field in the list.

BradBowman_3-1700328405125.png

A hack to ServiceNow fixing this behavior for this scenario would be to create a Business Rule like this:

BradBowman_4-1700328878220.png

The script on the Advanced tab would look something like this - depending on which field you want to use, or a static value for the Name:

 

(function executeRule(current, previous /*null when async*/) {
	current.name = current.sys_id;
})(current, previous);

 

This will ensure the Name field always has a value, which will appear in the list view instead of (empty).