How to apply Filter condition on Fields in Catalog Item

venkatanathansp
Tera Contributor

In catalog item, i have one fields one is Vendor which is referenced to core_company table and i have another field Contract number which is referenced from the ast_contract table. My requirement is when the user selects any company from the Vendor field , then the contract number should be filtered based on the company vendor which is selected by the user. In ast_contract table we have the vendor field, so that when the user selects the company name in vendor field then the contract number should be filtered based on the company which selected by the user. Give me the solution for this one.

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

In this case you don't need to call a Script Include, you can use a reference qualifier that looks like this:

BradBowman_0-1736083479948.png

where 'v_vendor' is the name of your Vendor variable.

View solution in original post

4 REPLIES 4

fathahhkf
Tera Contributor

Hi @venkatanathansp,

 

You can write a filter it in advance reference qualifier. Please find below sample.

 

javascript:'vendor='+current.variables.company.value

 

 

Regards,
Abdul Fathah
If my response helped please mark it correct and close the thread so that it benefits future readers.
If this response was helpful, please consider marking it as 'Helpful' or 'Accept as Solution.'
Your feedback not only supports me, but also helps others in the community who may have similar questions!

Regards,
Abdul Fathah

Ankur Bawiskar
Tera Patron
Tera Patron

@venkatanathansp 

you can use advanced ref qualifier on Contract number variable

something like this

// give the correct field name on ast_contract table

 

javascript:'vendor='+ current.variables.vendorVariable;

 

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

@venkatanathansp 

Thank you for marking my response as helpful.

As per new community feature you can mark multiple responses as correct.

If my response helped please mark it correct as well so that it benefits future readers.

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

Brad Bowman
Kilo Patron
Kilo Patron

In this case you don't need to call a Script Include, you can use a reference qualifier that looks like this:

BradBowman_0-1736083479948.png

where 'v_vendor' is the name of your Vendor variable.