Display name for a reference variable

Khanna Ji
Tera Guru

Hi Team,

I have a requirement where I am showing the full name + user id of a user on a portal with a reference variable on portal. For this I have created a new field called u_user_name_id. On insert/update on user table, I am updating the field value with a contamination of the user full name + id.

Now I had changed display value to true for this field but it is affecting other catalog items where we do not want like this. It had been escalated so I changed the display value back to full name to true.

Now how can I show my newly created field value in the variable without changing the display value property?

1 ACCEPTED SOLUTION

Hi,

in that case then you need to set that field as display=true i.e. asset_tag

now one thing could be possible since that table already contains name field it would by default show during lookup but once you select it would show asset tag or the custom field

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

View solution in original post

13 REPLIES 13

Hi,

please give this as well in the the variable attributes

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=asset_tag,ref_ac_columns_search=true

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

I tried it. But did not work. Asset tag field is showing in the search list but not in the field when I select.

find_real_file.png

-------------------

find_real_file.png

-------------

find_real_file.png

Hi,

it would show during the lookup but not after selecting the value

After selecting it would only show the value which is display=true

try clearing instance cache using cache.do and then logout and login again

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

I want to show the value after selecting the value, not in the lookup dropdown.

Hi,

in that case then you need to set that field as display=true i.e. asset_tag

now one thing could be possible since that table already contains name field it would by default show during lookup but once you select it would show asset tag or the custom field

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