Override Display Value on a reference field issue

tysonwenger
Mega Expert

Hi,

So i'm working with a reference field called "location" which points to table "cmn_location".       I have another table which extends "cmn_location" called "fm_space", which has a different field marked as the "Display" field.  

Is there a way when a user actually selects a "fm_space" type value, that the display column for that table is shown as opposed to the "cmn_location" display column?

I figured the "Override Display Name" would do the trick, but that doesn't appear to work...

Thanks,

-Tyson

6 REPLIES 6

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Tyson,



Override display name will only work for the same referenced table. I don't think you can set the display value of table fm_space as the reference field points to location table.


I found a workaround... not the prettiest but it works.



I created a new field on table "cmn_location" called "u_identifier".   Then I created a Business Rule on table "fm_space" (before insert/update) that copies the value of field "internal_name" to field "u_identifier".   Now when data is imported from Micello or the field is updated, the data is transferred 1:1 to the new field.



And now that the new field "u_identifier" is on the table "cmn_location" and contains the room number; I was able to add an Override Attribute on that reference field "location" on table "facilities_request" :



ref_auto_completer=AJAXTableCompleter,ref_ac_columns_search=true,ref_ac_columns=u_identifier



Now when a user starts typing in the field "location" they see the "name" field and "u_identifier" (which is the room number)!


Thanks for the update Tyson. I'm glad you got it resolved.


Please mark the thread and close the loop as the issue is resolved now.


Hi Pradeep,



I'm not sure how to mark the thread and close it.   I've looked at all the options and none of those appear to me anywhere on the thread... I'm probably missing something.



Thanks,



-Tyson