I want to fetch the value of template used in kb article and want to populate it in variable

Jinkal
Tera Contributor

I have checked in multiple posts but solution provided is that template value is in class filed on kb_article. However, I need the below selected value from red box 

Jinkal_0-1710335437465.png

If you have an idea about it, please help me with this.

Thanks

2 REPLIES 2

swathisarang98
Giga Sage
Giga Sage

Hi @Jinkal ,

 

There are two ways one is mentioned in below article,

https://www.servicenow.com/community/developer-articles/track-template-usage/ta-p/2305421 

 

second solution is you can create a custom variable in kb_knowledge table something like "Template used" and make it read only and while creating template you can set the value of newly created field (Template used)to template name so that you can use it as you want or report on it.

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

Jinkal
Tera Contributor

Thanks Swathi...But it didn't worked for me.

I want to show the value selected from toggle template bar to the custom field. But unable to fetch the value of Template selected after clicking  "Toggle Template Bar"