Reference field display value

SanikaK
Tera Expert

I have to create a new variable 'Application AIR ID' referencing to 'u_air_attributes' table & the 'Application AIR ID' should display the Application ID's.
But the problem is when I am creating the reference variable it displays the 'Application Name' as the display value is true for it in 'u_air_attributes' table. I cannot change the display true as the table is owned by other team & also it will affect globally.
How can I achieve this I tried using the variable attribute -
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=u_application_id,ref_ac_columns_search=true,ref_ac_display_value=false

But this shows both the Application Name & Application ID and also when I select any option it shows the application name.

1 REPLY 1

pr8172510
Tera Guru

 

Hi @SanikaK,

If the requirement is to display only the Application AIR ID without changing the Display field on the u_air_attributes table, one supported approach is to use a Lookup Select Box variable instead of a Reference variable.


Configuration:

Type = Lookup Select Box
Lookup source = Table
Lookup from table = u_air_attributes
Lookup value field = u_application_id

 

 

This displays:

pr8172510_0-1782215672621.png

 

 

 

directly in the catalog item and does not depend on the table's Display field (Application Name).

If a true Reference variable is required, ServiceNow will always display the referenced table's Display Field after selection. In that case, attributes such as

ref_auto_completer=AJAXTableCompleter,
ref_ac_columns=u_application_id,
ref_ac_columns_search=true

 
 

can help users search by AIR ID, but the selected value will still display the table's Display Field.

So for displaying only AIR IDs without changing the table Display field.