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

Gurpreet Kaur5
Tera Expert

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
  • Cariable attributes: ref_qual_elements=category

GurpreetKaur5_1-1702451383145.pngGurpreetKaur5_2-1702451409697.png

 

GurpreetKaur5_3-1702451440066.png

 

 

GurpreetKaur5_4-1702451492261.png

 

This is what i can see on the front end - category is populating however no subcategory is showing -

GurpreetKaur5_0-1702451338927.png

Please advise.

1 ACCEPTED SOLUTION

Aniket Chavan
Tera Sage
Tera Sage

Hello @Gurpreet Kaur5 

I have implemented your requirement on my PDI and it worked after making few changes in category variable , so you can also refer the below attached screenshots and let me know if you have any further questions.

AniketChavan_0-1702463992651.png

AniketChavan_1-1702464029192.pngAniketChavan_2-1702464074676.pngAniketChavan_3-1702464114466.png

Let me know your views on this.

Mark Correct if this solves your issue and also mark 👍Helpful if you find my response worthy based on the impact.

Regards,
Aniket

View solution in original post

6 REPLIES 6

_Gaurav
Kilo Sage

Hi @Gurpreet Kaur5 
I don't see any mistake here, make sure the backend name of the field on the catalog item matches the backend name of the field on the table.

Gurpreet Kaur5
Tera Expert

Hi Gaurav,

The only difference i can see is this - 

 

GurpreetKaur5_0-1702461355833.png

 

GurpreetKaur5_1-1702461379712.png

I do not have other category available.

Would it cause the issue?

Could be possible, is there any other variable is there which has the same backend name?

Aniket Chavan
Tera Sage
Tera Sage

Hello @Gurpreet Kaur5 

I have implemented your requirement on my PDI and it worked after making few changes in category variable , so you can also refer the below attached screenshots and let me know if you have any further questions.

AniketChavan_0-1702463992651.png

AniketChavan_1-1702464029192.pngAniketChavan_2-1702464074676.pngAniketChavan_3-1702464114466.png

Let me know your views on this.

Mark Correct if this solves your issue and also mark 👍Helpful if you find my response worthy based on the impact.

Regards,
Aniket