- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 01:57 AM
Hey Developers,
I want to Modify Popular Item Widget.
Ex:- From past 1 year (A & B) items are used often & visible under Popular Items.
I wanna know the period (1 year , 6 months, etc..). How does it gets calculated & visible under the Widget.
I also want to reduce the time span under the widget.(Once I know the OOB time span of calculation).
Ex:- If OOB is calculating the Items used in 1year then I want to reduce it to 6 or 3 months. Because it takes longer time to Load.
Can you please help me understand how this widget works & how can I achieve my task.
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 06:22 AM - edited 12-08-2022 06:23 AM
@Naveen87 They are showing the only 9 or any limit added in the instance options. Please data.limit variable.
Out of all the RITMs they are taking 9 or any number added in instance options. (Checking the data,limit condition in while loop)
If you want it to be within 6 months then add an extra query like below
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 02:37 AM
@Naveen87 The widget name is "SC Popular Items" its used in "sc_home" page
Open the widget and check server side code
If you think you need to change it then clone the widget do the changes and add it to the page you want
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 06:08 AM
I could not find any time limit for this.
I can see it shows all the RITM's raised since the Item was build.
This takes a lot of time to load.
Can we add some encodedquery?
After line No.6
For last 12 months.
Is 6 months query right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 06:22 AM - edited 12-08-2022 06:23 AM
@Naveen87 They are showing the only 9 or any limit added in the instance options. Please data.limit variable.
Out of all the RITMs they are taking 9 or any number added in instance options. (Checking the data,limit condition in while loop)
If you want it to be within 6 months then add an extra query like below
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 12:23 AM
I have tried 6 , 3 last month now.
Before add this condition time was 26 sec.
After adding it's reduced to 14-15 sec. For all 6 , 3 & last time is same.
What else can be done here to reduce the response time.
Can it be get more quicker?
Any suggestions?