How can I report on the character count on either description or closure code

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 01:33 AM
For data quality, I have been asked to run a report where either the description or close notes have a character/word count that is under an acceptable amount.
For example if an agent closed a ticket and in the close notes just put either 'resolved' or 'fixed it'. Then it would be under 20 characters or 10 words.
I need to find a way where I can report all tickets where close notes are less than 20 characters or less than 10 words.
Is this possible or will this require development?
I have looked at the close notes filter and there is a greater than or less than option but I don't know what the measure is there. I have also looked under the related list conditions and I couldn't find anything there either.
Has anyone got a solution for this?
- Labels:
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 01:53 AM
Hi,
There is no way to do it via the reporting module of ServiceNow.
At max you can write a script to apply the logic and get the ticket numbers with description < 20 chars
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 02:16 AM
Hi,
You can create a script include and call the script include in report.
For ex: Below is the script include function logic to get the list of incidents that a close notes length is less than 5 characters
Script include function:
getIncidents: function() {
var res=[];
var gr= new GlideRecord('incident');
gr.addEncodedQuery("incident_state=7");
//gr.setLimit(2);
gr.query();
while(gr.next())
{
var len= gr.close_notes.toString().length;
if(len<5)
{
res.push(gr.sys_id.toString());
}
}
return res;
},
Report condition:
Create a report on Incident table and set condition on sys_id field.
Below is the method to call script include:
javascript: new <<script include name>>.<<script include function name>>();
Ex Condition:
Sys ID is one of javascript: new getLen().getIncidents(); //getLen is the script include name and getIncidents is the function name.
If I have answered your question, please mark my response as correct and/or helpful.
Thanks,
Suseela P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2021 03:39 AM
This does not work, at least not in Quebec.
You have to write gr.getDisplayValue('close_notes').length.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2021 03:28 AM
Hi Susseela Peddisetty,
I want to know how many Characters/ Letters we have in all incidents over the last year.
So is it also possible to change your script, that the number of the characters in for e.g., Worke Notes or Short description is the result?
Looking forward for your help.
Best regards
Josef