Displaying a dot walk field on catalog item variable reference field

jonsr20
Tera Expert

Hey Everyone,

 

I am trying to directly display a dot walk field in a reference variable on a catalog item. From what I have seen I may need to use an On change client script but am not having much luck. The table I am referencing is pm_project and the field I need to display is pm_project.number. I want to be able to search by the project number and the direct reference will only let me search by name. Can anyone assist me with an on change script that may achieve this goal? I attached a picture of the project reference field where I would like that pm_project.number to appear and a picture of the variable.

 

Thanks,

Jon 

2 ACCEPTED SOLUTIONS

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

If i understand it right, you need to be able to search the list by Project name and number both, if that is right then you can add the below attribute to the variable

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=<Column_name1,column_name2,column_name3>,ref_ac_columns_search=true

 

After that it will show both columns in the search and you can search by any. Like below

AnuragTripathi_0-1718029398805.png

 

-Anurag

View solution in original post

Yeah! On the variable form there is a 'type specification' tab, and then a 'variable attributes' field. Add the following

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=number,ref_ac_columns_search=true

 

Context https://docs.servicenow.com/bundle/washingtondc-servicenow-platform/page/product/service-catalog-man... 

View solution in original post

6 REPLIES 6

Kieran Anson
Kilo Patron

You can add addition columns to be displayed and searched on for a reference field. Would this solve your requirement rather than adding an additional variable?

It would if I can add another column for pm_project.number and search by the project number instead of the name. Can this be achieved?

Yeah! On the variable form there is a 'type specification' tab, and then a 'variable attributes' field. Add the following

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=number,ref_ac_columns_search=true

 

Context https://docs.servicenow.com/bundle/washingtondc-servicenow-platform/page/product/service-catalog-man... 

That worked thank you!!!