Select the column in the reference type variable

jkelvynsant
Tera Contributor
 

Hello community, I have a reference variable that by default displays the "Name" column. I would like it to display the "u_managed_by" column only in that case. I applied this code:

 

image.png

 

But the visualization is like this:

 

image.png

1 ACCEPTED SOLUTION

Huynh Loc
Mega Sage

Hi @jkelvynsant ,

For a single-selection Reference field, the "display column" value is the designated display value of the referenced table and cannot be hidden via standard variable attributes in the Service Catalog. Workaround: Use a Lookup Select Box
  • Instead of a Reference field variable, use a Lookup Select Box variable type.
  • This allows you to choose which field from the referenced table is used as the display value, giving you more control over what is shown to the

View solution in original post

6 REPLIES 6

Huynh Loc
Mega Sage

Hi @jkelvynsant ,

For a single-selection Reference field, the "display column" value is the designated display value of the referenced table and cannot be hidden via standard variable attributes in the Service Catalog. Workaround: Use a Lookup Select Box
  • Instead of a Reference field variable, use a Lookup Select Box variable type.
  • This allows you to choose which field from the referenced table is used as the display value, giving you more control over what is shown to the

Not applicable

Hi @Huynh Loc ,

It looks like the table currently has the Display value set to the “Name” field, which is why the reference variable is showing that value. Updating the Display = true field to u_managed_by would solve the issue. 

 

Navigate to Dictionary -> Search by table name & Display = true.

Clear the display field from Name and set it to true to the field you meant to show.

 

PS. This will be change the display value of this table , so any where this table will be used or referenced it will show the new display value.

Also , Make sure only 1 field has Display = true for a table.

 

Thanks,

Aparna

Tanushree Maiti
Kilo Patron

Hi @jkelvynsant 

 

For your referenced table ->  set that u_managed_by as display=true  instead of Name

 

Impact:  This change will impact globally . Wherever this table has been referenced, there instead of Name ,u_managed_by will be displayed.

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Ankur Bawiskar
Tera Patron

@jkelvynsant 

By default whichever field is marked as Display=true on that table will be shown once you select the reference value

If you wish to change it to some other field then it would be a global impact so wherever this table is being referred it will start showing Managed by instead of Name

Note: please discuss this with your customer

OR

Another approach is to use Lookup select box variable and point to that table

In Lookup label field give -> u_managed_by

Example like this:

55.png

Output

56.png

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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