Catalog item reference field

Shubham Zanwar
Tera Expert

ShubhamZanwar_0-1711613815426.png

ShubhamZanwar_1-1711613840111.png

 

I have 2 variables in my catalog item as you can see in the picture above. First variable is the dropdown of the list of category. Second variable is the reference field to the Catalog item table.

I want to only show those catalog items in second reference variable which has the category I selected in the first variable.

Catalog item table has the field 'Category'.

Please give me solution.

3 REPLIES 3

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @Shubham Zanwar,

 

Are those choices custom ? If so then you can go with the below approch.

 

1. Create a JSON system Property as like below.

 

 

 

 

{
laptop: <add the encoded query to return only laptop catalog item>
desktop: <add the encoded query to return only desktop catalog item>
printer: <add the encoded query to return only printer catalog item>
add more based on your choice......
}

 

 

 

 

 

2. Create a Reference qualifier on the reference field to pass the value selected in choice field and get the encoded query (which will return all the item )which is relevent to your choice selection.

(create scriptinclude which returns sys_id of selected choice...)

 

if its not a custom choice and if its the same category which is in catalog item then simply go to advance ref qualifier of the reference field and update it as below.

 

 

 

javascript&colon;'category=' + current.variable._your_varaiable_name;

 

I hope this helps....


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

1__AnithaHV
Kilo Sage

Hi @Shubham Zanwar ,

 

Please use the below code in the advance reference qualifier.

javascript&colon; 'category=' + current.variable.varaiable_name;

 

Please let me know if this helped you to resolve your issue.

 

Thanks & Regards,

Anitha H V

Pushpanjali
Tera Contributor

Create UI Policy for that,

or you can set field values using on change client script.

 

marking our response as HELPFUL or ACCEPT SOLUTION , this may help other community users to follow correct solution in future...

 

Regards,

Pushpanjali