Auto-Complete Reference Field Search for Multiple Fields

kesha
Kilo Contributor

I created a Service Catalog Item request and had a question regarding one of the requirements. The UI Macro associated to this request functions as required, however I need to have two values (Vendor Number and Alternate Vendor Number which are custom fields we created for the core_company table) auto-populate when the user is searching for the Company Name (as pictured in the screenshot below). The only way I was able to make this function was by adding an attribute to the core_company dictionary entry, but this is not our ideal option. Any feedback on how to implement this into my UI Macro would be greatly appreciated. I attached a copy of the UI Macro.

Attribute:

ref_ac_columns_search=true,ref_ac_order_by=name,ref_ac_columns=u_vendor_number;u_vendor_number_alternate,ref_auto_completer=AJAXTableCompleter

find_real_file.png

1 ACCEPTED SOLUTION

Gurpreet07
Mega Sage

ui_reference is a ui macro having support for attributes .. completer,columns.



find_real_file.png


View solution in original post

15 REPLIES 15

I have also tried every combination explained in the docs on auto_complete reference fields. this attribute logic seems to be working fine on fields referencing to sys_user and cmdb_ci but for some reason its not working for the reference field referencing to cmdb_ci_service. Am I missing some logic here.?

This field is on task table and its having a dictionary override for incident and you need to modify the dictionary override instead. 

find_real_file.png

so the attributes should be pasted here instead of the attributes field on configure dictionary?

 

Yes.

I am using the same for cmdb_ci field on change form, but it is not working:

 

ref_ac_columns_search=true,ref_auto_completer=AJAXTableCompleter,ref_contributions=task_show_ci_map;show_related_records,ref_ac_columns=sys_class_name;serial_number,ref_ac_order_by=sys_class_name

 

Where am I missing something?

I checked on Task table field cmdb_ci and it is same what i have when cmdb_ci checked on change form.

 

Please assist here in.