Incident subcategory field is not updating dynamically

chennessy
Kilo Expert

Geneva version, using Incident form, Category is selected.   Subcategory list does not update to the dependent category list unless the form is submitted/saved.     One other thing to mention is that the subcategory is a list field, not a choice field, so the user can select multiple subcategories.         Any suggestions are much appreciated!  

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Cheryl,



You'll need to create a reference qualifier on the list field to have it 'aware' of the category field. I'll assume your subcategories have a 'u_category' field in there somewhere to tell which categories go with which subcategories.



Reference Qualifiers - ServiceNow Wiki



For example:



javascript:'u_category=' + current.category


View solution in original post

9 REPLIES 9

Chuck Tomasi
Tera Patron

Hi Cheryl,



You'll need to create a reference qualifier on the list field to have it 'aware' of the category field. I'll assume your subcategories have a 'u_category' field in there somewhere to tell which categories go with which subcategories.



Reference Qualifiers - ServiceNow Wiki



For example:



javascript:'u_category=' + current.category


Thanks Chuck.   No luck yet.  


I don't see where the Dependent Value is referred to as "u_category" anywhere.


I know that the dependent values are working because if I save the form, the correct subcategory list is then displayed.   I just don't see where they would be referred to as "u_category"


 


Also, as a Reference Qualifier, I am assuming the following on the Reference Specification tab:    


Reference:   blank   (since this is not a reference field but rather a list field)


Use reference qualifier:   Advanced


Reference qual:     javascript:'u_category=' + current.category


What might I be doing wrong?   Thanks again.


Can you clarify the field names for me? What is the actual field name (not label) for Category. You can get this by right clicking on the field label and selecting "Show <fieldname>". Do the same for Subcategory.



Even better, include a screenshot of the results when you select that Show option, it will tell me table, field type, and other basic information about the field. With that, I can help you further. Right now the details are a bit muddled in my head.


Chuck,


Unfortunately, I cannot provide screen shots.   But here is what I see:



Dictionary Info: incident.category


        Table         incident


        Field         category


        Type         string


        Max Length         40


        Attributes         edge_encryption_enabled=true



Dictionary Info: incident.subcategory


        Table         incident


        Field         subcategory


        Type         glide_list


        Max Length         40


Dependent         category


        Attributes         slushbucket_ref_no_expand=true,no_sort=true



The glide_list seems to be the issue; it works fine if I set the subcategory as a regular choice field and allow only one selection (meaning the subcategory list of choices updates appropriately as soon as a new category is selected).     But because the customer is requesting the ability to select multiple subcategories, I have to use a list field.     It does not update to the correct list unless I click on   SAVE after selecting the category.



Does that help?


Again, thanks!