Reference Qualifier on Catalog item not working.

Mark Brogna
Tera Contributor

I have a client callable script include that returns all product classifications referenced in the cmdb_software_product_model table.

MarkBrogna_1-1742426151363.png

 

 

I call this from a catalog client script to populate a select list variable, labeled ‘Select a function’, with both sys_id and display.

MarkBrogna_2-1742426195350.png

Once a user selects the ‘Select a function’ I want to build a reference qualifier based on the sys_id to populate ONLY records from the cmdb_software_product_model table that are assigned the function selected.

 

MarkBrogna_0-1742425978760.png

 

It appears that a sys_id is being returned from the value select in the function select box. But, the reference qualifier does not appear to be working for the function, 'Action games', as two values should be returned. When I hard code the sys_id in the reference qualifier it returns two results in 'Please select software.'

MarkBrogna_3-1742426323612.png

 

 

6 REPLIES 6

JohnnySnow
Kilo Sage

@Mark Brogna

1. Is product.function_type a custom field? I couldn't find that in my PDI

2. The usage seems incorrect here, what are you trying to achieve? 

3. The reference qualifier is looking for 'current' object which is not accessible on the client side. You might want to try using g_form.getValue/getdisplayvalue to fetch the record. But having said that, the whole approach seems incorrect.

Thanks
Johnny

Please mark this response as correct or helpful if it assisted you with your question.

Ankur Bawiskar
Tera Patron
Tera Patron

@Mark Brogna 

so you are popuplating drop down based on script include values

Next you want to filter the reference field based on the drop down user selects?

function_type is not a field on table "cmdb_software_product_model"

Are you sure you are using the correct field in ref qualifier?

Also the select box will give you choice value when you use this syntax current.variables.variableName

So please ensure you are comparing it against the correct field in table "cmdb_software_product_model"

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