- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 11:13 PM - edited 12-12-2023 11:42 PM
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
This is what i can see on the front end - category is populating however no subcategory is showing -
Please advise.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 02:43 AM - edited 12-13-2023 02:44 AM
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.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 01:06 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 01:56 AM
Hi Gaurav,
The only difference i can see is this -
I do not have other category available.
Would it cause the issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 02:01 AM
Could be possible, is there any other variable is there which has the same backend name?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 02:43 AM - edited 12-13-2023 02:44 AM
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.
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