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

Hi,

in that case I think you will have to identify those records and either fill value or clear those

Regards
Ankur

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

Unfortunately there are thousands of records which are displaying as either (empty) on list view ot blank on form view, but there is some value attached to it in the background. What is the best way to view them and edit them apart from xml?

AMIT SHISHODIA2
Giga Guru

Hi, can you try passing sys_id to reference field and also check that the new value which you are assigning to the field is already present in the field or not.
Because reference field can't be assigned any value(Value which is not present in the table to which they are referring).

Kindly mark Correct and helpful if it helps you.

In case of any query kindly reply