Catalog Items, variables

Fatemeh Rahimi
Tera Expert

Hi everyone,

I have a table that includes several fields, such as Number and Vehicle Model. I'm trying to use two variables in a catalog item, both referencing this table.

The first variable is Number, which works fine. The second is for Vehicle Model — I set it as a Reference to the same table. However, when I view the catalog item in the Service Portal, the dropdown for this variable still shows the Number field values, instead of the actual Vehicle Model.

I would like the dropdown to display the Vehicle Model field, not the Number. Is there a way to do this without using a script?

Thanks in advance for your help!

2 ACCEPTED SOLUTIONS

J Siva
Tera Sage

Hi @Fatemeh Rahimi 

 

This is the expected behavior of the "Reference" type field. The "Number" field should be set as the display field for that table. If you want to show the Vehicle Model field instead, you can use a "Lookup Select Box" type variable.

Note: Using a Lookup Select Box may cause performance issues if the table has a large number of records.

 

May I know the reason why you are using two different variables to select the record from the same table.

If you.are looking to Auto-populate the vehicle model based on the number, then you should use "Auto-populate" feature.

Regards,

Siva

View solution in original post

D_Jumah
Mega Guru

Hi Fatemeh,

The best way to achieve this is to use the reference qualifier approach - This will display the vehicle model values.

In the catalog variable - vehicle model ,On the type specifications tab,

Set "Use reference qualifier"  , then configure your reference qual.

OR use the variable attributes "ref_ac_columns=vehicle_model"

 

I am assuming you want to auto populate the vehicle model field when Number is selected ? This can also be done by using the Auto populate approach. 

Dave

DJ

View solution in original post

7 REPLIES 7

J Siva
Tera Sage

Hi @Fatemeh Rahimi 

 

This is the expected behavior of the "Reference" type field. The "Number" field should be set as the display field for that table. If you want to show the Vehicle Model field instead, you can use a "Lookup Select Box" type variable.

Note: Using a Lookup Select Box may cause performance issues if the table has a large number of records.

 

May I know the reason why you are using two different variables to select the record from the same table.

If you.are looking to Auto-populate the vehicle model based on the number, then you should use "Auto-populate" feature.

Regards,

Siva

Thanks, that was really helpful!

 

Rafael Batistot
Tera Sage

Hi @Fatemeh Rahimi 

Create a reference variable to look up the Number field (which you've already done), and another variable of type Single Line Text for the Vehicle Model.

Then, create a Catalog Data Lookup Definition, where you map the Number field as the input and the Vehicle Model text field as the output.

Anubhav24
Mega Sage
Mega Sage

Hi @Fatemeh Rahimi ,

Under your variable for vehicle there is variable Attribute under this you can use this attribute "ref_ac_columns" and use the field which you want to display under vehicle variable.

 

Also you can refer below documentation :

https://www.servicenow.com/docs/bundle/yokohama-platform-administration/page/administer/field-admini...

 

Please mark correct/helpful if my response helped you