Value is displayed as blank on a reference field, but value is present

YT
Kilo Contributor

Hello,

I recently updated a reference field (field A) via fix script to pick a value from some other field (field B) on the same form and regex it out and populate it. The issue here is, the value on the field A that was supposed to populate the information only displays if it is present in the reference table. If it is not, it displays as empty, but when I check the XML, the value is present.

I read somewhere on the community  “ The most common reason this occurs is that the sys_id stored in the record does not point to a valid record. In your case, the stored value is "xxxxx xxxx", which most likely is not a valid sys_id. This can occur for example if a script sets the value and puts in the incorrect field “

This is what seems to be my issue too.

Now what I want to do is, delete the unseen data that is stored in the xml but not showing up on the display and basically just show the values on field A that are true values and are present in the referenced table.

Any help on this would be appreciated.

Thanks! 

7 REPLIES 7

Sajilal
Mega Sage

Is it happening for all records? If yes and If the value is not deleted and it exists, please check the target table dictionary for Display Value field, make it as true for one of the dictionary which you want to display in the reference field.

Please Mark as Correct if this solves your issue and also mark 👍 Helpful if it helps resolve your problem.

Thanks,
Saji

YT
Kilo Contributor
Not on all the records. The ones which do not have any true record on the reference table, they are showing blank on the form and empty on the list view. However there is an arbitrary value created by the fix script and stored which can be viewed via xml. I do not want that value to be present. Instead just display as empty or blank wherever the reference is not found.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Did you check the record itself is present or not?

This happens sometimes if the record is not present or it has been deleted

Please share the screenshot of the form

Regards
Ankur

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi, The record is not present on the referenced table. It just got created based on the fix script and is only displayed on the xml. For the records that are not present on the reference table, I want them to be empty, instead of displaying some arbitrary records that were created because of the script.