- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 08:07 AM
Hello, Was wondering if some one could help me with retrieving a list of sub-categories based on their dependent value. Basically I have a catalog item where you pick a category and I want the sub-category list to only show those associated with the category.
Thanks
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 11:14 AM
Hi,
You can try below method
For category
Variable type : lookup select box
Lockup from table : choice (sys_choice)
Lookup value field : value
lookup label field : label
reference qualifier: element=category
if table specific
reference qualifier = name=incident^element=category
For subcategory
Variable type : lookup select box
Lockup from table : choice (sys_choice)
Lookup value field : value
Lookup label field: label
reference qualifier: javascipt:'element=subcategory^dependant_value='+current.variables.'CATALOG ITEM CATEGORY VARIABLE NAME'
if table specific
reference qualifier = javascript:'name=incident^element=subcategory^+current.variables.'CATALOG ITEM CATEGORY VARIABLE NAME'
variable attributes: ref_qual_elements=CATALOG ITEM CATEGORY VARIABLE NAME
Regards,
Mahesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 10:02 AM
Both values are being pulled from our Software Product table. I have both defined in my catalog item as Lookup Select Boxes. For Category the Lookup from table is Software Product and the Lookup value field is Category. For Sub Category the Lookup from table is also Software Product and the Look up value field is Sub Category. I added the provided Reference Qualifier and Variable Attributes to the Sub Category variable and it returns all Sub Categories.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 10:06 AM
Use :
javascript: 'category='+current.variables.v_category
Assuming category is backend name in software product.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 10:54 AM
Hi,
You can try something like mentioned in the attachment images
Regards,
Mahesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 11:00 AM
Hi,
You can try something like mentioned in the attachment images.
Regards,
Mahesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 11:14 AM
Hi,
You can try below method
For category
Variable type : lookup select box
Lockup from table : choice (sys_choice)
Lookup value field : value
lookup label field : label
reference qualifier: element=category
if table specific
reference qualifier = name=incident^element=category
For subcategory
Variable type : lookup select box
Lockup from table : choice (sys_choice)
Lookup value field : value
Lookup label field: label
reference qualifier: javascipt:'element=subcategory^dependant_value='+current.variables.'CATALOG ITEM CATEGORY VARIABLE NAME'
if table specific
reference qualifier = javascript:'name=incident^element=subcategory^+current.variables.'CATALOG ITEM CATEGORY VARIABLE NAME'
variable attributes: ref_qual_elements=CATALOG ITEM CATEGORY VARIABLE NAME
Regards,
Mahesh