How to display two columns names in record producer reference field

Sahar_Kaizer
Tera Contributor

 

Hi,

I have created a record producer with a Caller field, which is a reference to the sys_users table.

When clicking on this field, I would like the referenced table to display the user's name and ID. I attempted to achieve this using list layout configuration, and it works for the backend view. However, it doesn't seem to work in the workspace.

 

Any insights or suggestions on how to make this work in the workspace would be greatly appreciated.

Thank you!

6 REPLIES 6

Maik Skoddow
Tera Patron
Tera Patron

Hi @Sahar_Kaizer 

please share a screenshot to make it more clear what your issue is.

Maik

this is what i see in the backend view (name and ID):

Sahar_Kaizer_0-1703508273521.png

 

and this is the same form in workspace (name and email):

Sahar_Kaizer_1-1703508433972.png

 

Hi @Sahar_Kaizer 

thanks for the screenshots which show me that you are not talking about any workspaces but probably a service portal.

So please follow instructions in the following article/video: https://www.glidefast.com/post/how-to-display-two-columns-in-a-reference-field-in-servicenow 

Maik

Tai Vu
Kilo Patron
Kilo Patron

Hi @Sahar_Kaizer 

You can use Variable Attributes to define the behavior for catalog variables.

Service Catalog variable attributes

 
In your case it is the ref_ac_columns attribute.
ref_ac_columns: Specifies the columns with display values that appear in an auto-completion list in addition to the name. Separate column names with a semicolon.
For example, ref_ac_columns=user_name;email;sys_created_on allows auto-complete to match text from the user_name, email, and sys_created_on columns. 
Applicable variables: Reference, Requested For
 
Sample.
Timi_0-1703517979197.png

Replace user_name (or id) by your ID Number field name

 

ref_ac_columns=user_name;id,ref_auto_completer=AJAXTableCompleter

 

 

Cheers,
Tai Vu