Catalog item reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 01:20 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 01:31 AM - edited 03-28-2024 03:28 AM
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:'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....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 02:14 AM
Hi @Shubham Zanwar ,
Please use the below code in the advance reference qualifier.
javascript: 'category=' + current.variable.varaiable_name;
Please let me know if this helped you to resolve your issue.
Thanks & Regards,
Anitha H V
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 02:43 AM
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