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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2023 08:28 AM
Gurus,
When I create a new "Checklist", for example from an "HR Service" record, using the dropdown button, like this:
And then I create Checklist Items, one by one, by using the "+ Add Item" button, like this:
And then I go look in the "checklist_item" table, I see the following:
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:
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2023 09:36 AM - edited 11-18-2023 09:37 AM
Hi Geoffrey,
If you view the Checklist table, you can set the Display column to sys_id or whatever
Note that this will always display this field in the list.
A hack to ServiceNow fixing this behavior for this scenario would be to create a Business Rule like this:
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).