How to show application name and app number in a reference field of catalog item?

manmathpanda
Giga Guru

Hi Team, 

 

I am trying to create one catalog item where one of the field called as below 

 

"please select cmdb app name or number" which is reference to cmdb_ci_appl table. 

 

Now when i typing the application name , it is not showing anything but when i type the application number it shows the number only not the application name . 

 

manmathpanda_0-1750364623989.png

 

and the variable looks like below 

 

manmathpanda_1-1750364825617.png

 

 

Now here i want to show applicaiton name and number both on the search field , is this possible?

 

Could anyone guide me here how to populate these values here. 

 

Warm Regards,

Guddu

 

 

 

 

4 REPLIES 4

J Siva
Tera Sage

Hi @manmathpanda 

Use the below variable attributes in your catalog variable.

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=name;u_number,ref_ac_columns_search=true

Regards,

Siva

Community Alums
Not applicable

Hi @manmathpanda ,

Yes, you can show both the application name and number in the reference field to cmdb_ci_appl in your catalog item. By default, only the display field (usually name or number) is shown, which is why your current setup only shows the number.

To fix this, go to your catalog variable, open it in advanced view, and add the following in the Attributes field:

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=name;number

This allows searching by both name and number and shows both in the dropdown.

Ensure the display field for the cmdb_ci_appl table is set to name for better user readability.

Now when users type either field, both values will be shown in search suggestions.

This doesn’t change the final selected display, but helps in identifying the record during search.

If needed, you can show the selected number using a catalog client script or additional display field

manmathpanda
Giga Guru

Hi Tejas,

Thanks for replying it. it worked . 

Now i am having one more question here 

 

manmathpanda_0-1750527143475.png

 

Like the datlookup select box we can show both number and name , can we show the same in reference field also. In reference field it is showing only number  not the name. 

 

I want to show both number and name in reference field like data lookup filed. 

 

Kinldy assist.

tajinderpal
Tera Contributor

1. Go to the variable (reference type) in your catalog item.

2. In the attribute field, add:

ref_ac_columns=number,name

3. If needed, set the

ref_ac_order_by_name to order by name.