Model field not populating dropdown as per the Model Category selected

Preksha Kapoor
Tera Contributor

Hi Folks,

We are creating a Record Producer for Hardware table and in this we want to populate Model field as per he Model category selected by the user.

 

For example : If user has selected " computer " as the Model category then the Model field should show dropdown related to Computer

 

We have tried Refrence Qualifer but it is showing the whole Model Table data

 

Tables used:

 

Model category: cmdb_model_category

Model : cmdb_model

 

PrekshaKapoor_0-1742369032359.png

 

1 ACCEPTED SOLUTION

Reus
Tera Expert

You could use a lookup select box type variable with following details:

Reus_0-1742371910909.pngReus_1-1742371936450.png

This works for me.

You can use Reference type variables with the reference qualifier as 'javascript&colon; 'cmdb_model_category='+current.variables.<variable_name_of_model_category>;'

 

Please check.

 

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Preksha Kapoor 

So it means your ref qualifier is not working correctly.

I could see both the variables are Lookup select box

Model Category refers to which table? share variable configuration screenshot and also what's the lookup value field

Model variable refers to which table? share variable configuration screenshot and also what's the lookup value field

what ref qualifier is applied?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur 
As I have mentioned earlier :

Tables used:

 

Model category: cmdb_model_category table

Model : cmdb_model table

Model Category

PrekshaKapoor_0-1742370976609.png

 

Model

PrekshaKapoor_1-1742371027048.png

 

Hi @Preksha Kapoor ,

 

Can you share the script include to see if there is any issue with the code?

 

Regards,

Rohit

Reus
Tera Expert

You could use a lookup select box type variable with following details:

Reus_0-1742371910909.pngReus_1-1742371936450.png

This works for me.

You can use Reference type variables with the reference qualifier as 'javascript&colon; 'cmdb_model_category='+current.variables.<variable_name_of_model_category>;'

 

Please check.