What is the use of "use_count" field in "kb_knowledge"

Sruthi_2511
Tera Contributor

Hi Community,

I understand that the "use_count" field represents the number of times a Knowledge Article has been attached to a task.

I attached a KB article to a Problem record, and the Attach Knowledge section correctly shows ( 1). However, this count is not getting reflected in the KB article’s "Use count" field.

Is this field updated through any scheduled job or any functionality behind? Please guide me

Sruthi_2511_0-1778048840321.png

Sruthi_2511_1-1778048899277.png

Sruthi_2511_2-1778049291397.png

 

 

1 ACCEPTED SOLUTION

Tanushree Maiti
Kilo Patron

Hi @Sruthi_2511 

Refer: KB0779072 use_count is not incremented when article is attached through Attached Knowledge related l... 

If you attached the article directly via the "Attached Knowledge" related list (using the "Edit" button) rather than clicking "Attach to Problem" through the Agent Assist/Contextual Search functionality, the necessary background scripts may not trigger.

 

The best practice is to attach the articles by clicking on the "knowledge search" next to short description and then click on "Attach to incident"/ "Attach to Problem" or enable the Contextual Search on short description and attach the articles to the incident. Doing so causes the following to happen:
1. When the KB article is attached to the incident/problem, the KB article link is visible in the Related Records related list Attached Knowledge section
2. The business rule "Create m2m_kb_task record on attach" is triggered which calls the script include - KnowledgeAjax
3. The script include has the code which triggers the event - KB Use which creates the record in the kb_use table and updates the use count

Currently, these events don't happen when a knowledge article is directly added via the Attached Knowledge related list.

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

View solution in original post

2 REPLIES 2

Tanushree Maiti
Kilo Patron

Hi @Sruthi_2511 

Refer: KB0779072 use_count is not incremented when article is attached through Attached Knowledge related l... 

If you attached the article directly via the "Attached Knowledge" related list (using the "Edit" button) rather than clicking "Attach to Problem" through the Agent Assist/Contextual Search functionality, the necessary background scripts may not trigger.

 

The best practice is to attach the articles by clicking on the "knowledge search" next to short description and then click on "Attach to incident"/ "Attach to Problem" or enable the Contextual Search on short description and attach the articles to the incident. Doing so causes the following to happen:
1. When the KB article is attached to the incident/problem, the KB article link is visible in the Related Records related list Attached Knowledge section
2. The business rule "Create m2m_kb_task record on attach" is triggered which calls the script include - KnowledgeAjax
3. The script include has the code which triggers the event - KB Use which creates the record in the kb_use table and updates the use count

Currently, these events don't happen when a knowledge article is directly added via the Attached Knowledge related list.

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: