Using sys_user as a variable catalog reference field - how do I make sure that users can search sys_user using user_name or name?

kareng
Tera Contributor

We created a record producer to be seen on our portal for the HR Catalog. One variable is a value from the sys_user table to designate what User this applies to .  Completing the Catalog item, that field, referencing sys_user , is only showing  name and not user_name field.  How do we make that happen?

Example:

search box shows

Andrew Guanci     emailaddres@partner.ccc

what we want is 

Andrew Guanci   AJG123    (both of these are stored on the sys_user table)

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

You could use the Variable attributes to accomplish this. In your case you might add "ref_ac_columns=field_name_you_are_after".

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

3 REPLIES 3

Mark Roethof
Tera Patron
Tera Patron

Hi there,

You could use the Variable attributes to accomplish this. In your case you might add "ref_ac_columns=field_name_you_are_after".

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Mark Roethof
Tera Patron
Tera Patron

Also see:
https://docs.servicenow.com/bundle/orlando-it-service-management/page/product/service-catalog-manage...

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Brad Bowman
Kilo Patron
Kilo Patron

You can update the Variable attributes on the Default Value of the reference variable.  Fields to be shown in the search box autocomplete are semicolon delimited following the ref_ac_columns tag, such as:

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=user_name;email;phone,ref_ac_columns_search=true,ref_ac_order_by=name

Once a record is selected, the table definition controls the column(s) that are displayed, so if you want additional or different columns to show in the selected value, set Display = true on the table definition