Category and Subcategory on ServiceNow Record Producers are not visible to user with no roles

Misbah Sayyed
Tera Contributor

create an incident ServiceNow record producer has category and sub category fields.
The subcategories showing either NULL or return all vales from sys_choice table it should show sub cat where the dependant value is current.category

 

For category variable I have done

  • Map to field: True
  • Field: Category
  • Record Producer Table: incident
  • Type: Lookup Select Box
  • Catalog item: (Select your record producer)
  • In the Question form section, we will simply name the field Category (or whatever you’d like in your scenario)
  • The Type Specifications tab is what we really need to focus on and what will drive the first half of our solution.
  • Lookup from table: Choice (sys_choice)
  • Lookup value field: Value
  • Lookup label field: label
  • And our most important field will be our Reference Qualifier. We need to find all the Category choices for the incident table.
  • Reference Qualifier: name=incident^element=category

 

AND sub category:

  • Map to field: True
  • Field: Subcategory
  • Record Producer Table: incident
  • Type: Lookup Select Box
  • Catalog item: (Select your record producer)
  • In the “Question” form section, we will simply name the field Subcategory (or whatever you’d like in your scenario)
  • Once again, the “Type Specifications” tab is what we really need to focus on.
  • Lookup from table: Choice (sys_choice)
  • Lookup value field: Value
  • Lookup label field: label
  • Once again, our ServiceNow reference qualifier is very important. Like before, we need to find all the Subcategory choices on the incident table and dynamically add the dependent value from the selected Category.
  • Reference Qualifier: javascript: “name=incident^element=subcategory^dependent_value=” + current.variables.category;

 

@Ankur Bawiskar @Chuck Tomasi @Community Alums @Karan Chhabra6 @Prince Arora @Maik Skoddow @Mark Roethof @Gaurav Shirsat @ghaing @tltoulson 

 

PLEASE SEE THE BELOW IMAGES FOR REFERENCE AND HELP ME WITH THE SOLUTION

MisbahSayyed_2-1686055839890.png

 

 

MisbahSayyed_0-1686055593366.png

 

MisbahSayyed_1-1686055640749.png





2 REPLIES 2

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

In the screenshot I do not see the reference qualifier for category and subcategory within inverted comma's Can you put it in inverted comma's and try as below:-

 

Category:-

 "name=incident^element=category"

 

Subcategory;-

“name=incident^element=subcategory^dependent_value=” + current.variables.category;

 

Please mark my answer as correct based on Impact.

 

hvaibhare
Tera Expert

Hello,

Please add the below two scripts for "Subcategory" variable.

1. Reference qualifier :  javascript: "name=incident^element=subcategory^dependent_value=" + current.variables.category;

2. 

Variable attributes : ref_qual_elements=category 
 
Refer below screenshot:
 
hvaibhare_0-1686058905239.png

 

Regards,

Harish V