Widget to show 'latest' Knowledge Articles in HR Portal

Carl Fransen1
Tera Guru

Hi Team,

We have a requirement where inside the HR Portal we want to be able to show a widget of the 'latest articles'.  The 'Latest' timeframe should ideally be configurable, but for starters we're going with 'within the last month'.

Has anyone done anything similar that I could use as a starter?

 

Thanks

Carl.

 

1 ACCEPTED SOLUTION

Gaurav Bajaj
Kilo Sage

Hi,

I have designed a new widget to display latest articles created in last 30 days which is also a configurable property through widget options.

Please try it & let me know if you need any help.

 

find_real_file.png

 

Attached is the code for the widget.

Please mark it correct/helpful based on the response.

Thanks
Gaurav

 

View solution in original post

10 REPLIES 10

Gaurav Bajaj
Kilo Sage

Hi,

I have designed a new widget to display latest articles created in last 30 days which is also a configurable property through widget options.

Please try it & let me know if you need any help.

 

find_real_file.png

 

Attached is the code for the widget.

Please mark it correct/helpful based on the response.

Thanks
Gaurav

 

Thanks Gaurav - will test this and let you know how I get on!

Hi Gaurav,

I have implemented this and it works fine except for one issue.  If I have the widget configured for 30 days it doesn't show any articles at all, even though the 'sys_created_on' date is within that timeframe, but if I set that to say 500 it shows a bunch of articles including the ones within the 30 days.

Is there a synchonisation (or similar) that occurs that I need to wait for or should the articles show as soon as they are created?

Not sure what is going on, hoping you can help.

 

Thanks

Carl.

Hi Carl,

There are few conditions which need to satisfy to display articles on the portal.

 1) Articles belong to the KB base you have selected in your portal.( IT in my case)

 2) Articles should be published.

 3) You should have read access to articles.

 

You can debug it by applying these conditions in the backend & see if it gives you those articles count as same as on portal based on the no. of days option selected for the widget.

 

find_real_file.png

 

In the portal, I have set the limit to display only 5 articles which are as below.

 

find_real_file.png

Hope that will help you to solve the issue otherwise, I have tested widget in the different environment too and it works fine.

 

Let me know your findings.

Thanks

Gaurav