The CreatorCon Call for Content is officially open! Get started here.

Need to hide the name field in reference variable (service catalog form)

Sowjanya15
Tera Contributor

Hi,

Can you any one help if we can hide the name field in the reference variable in one of our service catalog form?

We only want to display two custom fields(u_display_name;u_short_description) in the reference variable.

I have updated as below but still "name" column is also displaying, we want to hide it.

Can you suggest on this?

Variable attributes:ref_auto_completer=AJAXTableCompleter,ref_ac_columns=u_display_name;u_short_description,ref_ac_columns_search=true

Thank you,

Sowjanya

 

 

 

1 ACCEPTED SOLUTION

Hi,

please logout and login again also clear instance cache using cache.do

Regards
Ankur

 

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

View solution in original post

11 REPLIES 11

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

This is because the name column has display as true mark in dictionary of that table.

Ex:

find_real_file.png

 

Thanks,
Ashutosh

Brad Bowman
Kilo Patron
Kilo Patron

I'm guessing that the 'name' column is set as the Display column, which will always show of reference fields and variables.  To change this you'll have to edit the table definition, and change Display to false. You can/should also change u_display_name to True.  Department table shown below for your reference

Hi, Already Display is false.

Hi Sowjanya,

Default value -> how it is calculated.

Reference fields look for the display value in the following order:

  • A field with display=true in the system dictionary on the lowest sub-table for extended tables.
  • A field with display=true in the system dictionary on the parent table.
  • A field named name or u_name.
  • The Created on field of the referenced record.

I assume your table doesn't have any display=true column then it checks for name field

It is there so it would show

That is expected behavior for reference variable

Just checked there is not Display=true field for cmdb_ci_service table hence it is taking name as per that order

find_real_file.png

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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