How to handle varying category values/dependent values?

Jacob Saaby Ni1
Giga Expert

Hi everyone.

Ok, so I have this problem I'd love some input on how to solve:

  1. Depending on which assignment group is chosen, certain categories become available.
  2. Depending on which category, certain subcategories become available.

So far so good, that's easy enough. I set the dependent value to the sys_id of the assignment group, which makes that category appear when that assignment group is chosen.

These categories may be:

  • Cat A
  • Cat B
  • Cat C

And the subcategories may be:

  • Subcat A
  • Subcat B
  • Subcat C

However, let's say some of the assignment groups need to share some of the categories.

Let's say that Cat A needs to be shared between two assignment groups.

I've tried creating duplicate entries into the category choices, each with the same name, but with different dependent values. So, depending on which assigmentgroup the categories would look the same, and submit using the same choice name.

This creates an error when I want to submit the incident. It basically says "java.sql.batchupdateexception duplicate entry 'sys_id' for key 'PRIMARY'".

I could simply change the names, and have the labels be identical. But in a reporting situation, that wouldn't work very well.

So, how do I solve this problem in a smart way? Any input on this?

7 REPLIES 7

Already have the Assignment Group field. Category is depending on that, and it evaluates based on the groups' sys_id, which options from the Category choice list, should be shown depending on what assignment group is chosen.

Jacob, As you have mentioned that you need same choice to be associated with different assignment group, so you need a new field on the sys_choice table. 

Please make it correct or helpful if this solves or help you with your issue for other to make use it.

Thanks & Regards,
Vikrant Sharma

ravichanduk
Mega Expert

HI jacob,

when u select cat A if u given in subcategory dependent value Cat A then its show only for cat A

if dont given dependent value in subcategory you can see all values in CAT A--subcat a,subcat b,subcat c