- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-01-2021 10:40 PM
Hi All,
We are creating a lot of record producers more than 300(for creating incidents) without including the category and sub category options. We don't want to let user to select category and sub category. Instead give search ability to return a simple form asking short description and description.
To create incident in the right category and sub category based on the record producer, in the backend either we can use templates or scripting.
If we use templates we will end up creating 1 template for each record producer (300 templates for 300 record producers)
If use script option, I will need to create a reusable script, where the category and sub category gets changed but is hardcoded. Something like below. But hardcoding is not a good coding practice.
current.category = 'Hardware';
current.subcategory = 'Server';
Does anyone have a better alternate, without hardcoding and using templates ?
Thanks in Advance.
Regards,
Anitha
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-01-2021 11:08 PM
Hi,
Then in that case couple of approahces
1) create a custom table to hold mapping of each category and subcategory and the record producer so that you would know what cat and subcat to be populated based on RP
2) create system property of type string which would hold json structure and then you can parse the json and get the cat and subcat value for RP
note: for custom table there will be cost involved based on your subscription
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-01-2021 10:44 PM
Hi,
refer these links and they should help you configure the same for record producer or catalog item
Using Category and Subcategory on record producers
ServiceNow - Dependent Variables on Record Producer in Service Catalog
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-01-2021 10:56 PM
Actually I do not want to show the category and sub category to be visible on portal.
Instead set it from backend for each record producer depending on the record producer, which would be different combination of category and sub category.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-01-2021 11:08 PM
Hi,
Then in that case couple of approahces
1) create a custom table to hold mapping of each category and subcategory and the record producer so that you would know what cat and subcat to be populated based on RP
2) create system property of type string which would hold json structure and then you can parse the json and get the cat and subcat value for RP
note: for custom table there will be cost involved based on your subscription
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2021 08:05 PM
Hi Ankur,
Thanks for so much.
I tried both the options and both the options are working.
Thanks,
Anitha