The CreatorCon Call for Content is officially open! Get started here.

Clone the OOB “Most Viewed Articles” widget, apply a default 90-day time filter, and add a configura

MohitSaxena
Tera Contributor

Hi All,

We have the reequipment to Clone the OOB “Most Viewed Articles” widget, Currently it shows all the article regardless of time, and shows Most viewed articles. 

we need to apply a default 90-day time filter, and add a configurable system property or widget option to adjust the day range without code changes.

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@MohitSaxena 
I recently shared analysis for this in earlier question

How to limit most viewed articles for a specific knowledge base and to filter for 90 days 

it's this widget "kb-mostviewed-articles"

I believe the filter is defined in platform level script include SNC.KnowledgeHelper() and we cannot do anything here.

OOTB widget is internally calling SNC script include and I think that's applying the filter of 30 days from platform level and hence you can't do anything here.

you can try to play with the script include I shared.

AnkurBawiskar_0-1760010138570.gif

 

 

💡 If my response helped, please mark it as correct ✔️ and close the thread 🔒 — this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader