- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2020 07:10 AM
Hi,
We are designing a solution where category and subcategory should be autopopulate in Incident record producer on basis of short description.
I have created a client script and it can be done by hard coding keyword and then setting category and subcategory.
Please advise if this is right solution. We have also proposes predictive intelligence but our client are not going with that approach.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2020 07:43 AM
Thanks for the update Amit. One of the possible options is to create a custom table to maintain the relationship between the short description/category/subcategory. Now you can create a catalog script + GlideAjax to populate cat and sub cat based on short description variable. This will enable your admins to modify the values in a table without the need to modify the Client script(*hardcoded values).
- Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2020 08:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2020 08:58 AM
Have the people submitting tickets asked for this?
$10 says they don't care (and would therefore never change the categories)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2020 07:20 AM
Unless there is a reason that the end-user needs to see the category / subcategory, or unless you need to allow the user to override the selection then I wouldn't advise doing this client-side. I'd make this a business rule, or part of your processing script.
If you must do this client-side, then you would still want to move the heavy-lifting server-side and create a GlideAjax call - pass in your short description, use the server for processing, and use the callback to set the values - that would minimize client impact.
Best practice is to do it all server-side.
If this was helpful or correct, please be kind and click appropriately!
Michael Jones - Proud member of the CloudPires Team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2020 07:25 AM
If your client does not want to use predictive intelligence for some reason then you are going to have to create a lookup table that has all of the terms in it and the category and subcategory's that should be used. You will probably have to use just a text field for the terms and then when you search the table do it with a text search. You will need a default if something is not found and someone is going to have to maintain the data in the table and thats going to cause administrative overhead.
Like others are pointing out you are going to want to have the server do the work as much as possible, either with a web service or have the record producer script look it up. Which way you go is going to depend on if you have a requirement to have the user see and possibly be able to change the category and subcategory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2020 11:24 AM
Hi Drew,
Thanks for the reply.
Can a custom script can achieve the accuracy like predictive intelligence. Please suggest how we can setup the lookup table with the possible keywords because users will not write the same description every time.