Hide Catalog Item from Popular Items

Rohan Verma
Tera Expert

Can please someone help me how can we hide a specific catalog item from popular items widget in SanDiego release?
As I have seen in SanDiego, the widget has been changed so much from the previous release, as my code is working fine in previous releases(by cloning the widget and add the query) now they are using script include to execute the popular items. Any solution, appreciated.

1 ACCEPTED SOLUTION

Rohan Verma
Tera Expert

Hi all,
I'm able to hide the specific catalog item from popular items widget in SanDiego.
Thanks for all the replies!

View solution in original post

7 REPLIES 7

suvro
Mega Sage
Mega Sage

So after the upgrade, code in your cloned widget was also changed ?

So now in your cloned widget, try to mimic that logic. Use the script include that is being used in OOB and check how you can modify as per your requirement or simply create a new server side code all together as per your need.

I have reverted it to OOB widget for now, and now the query has called in a ScriptInclude and also applied the same, but no luck

 

Can you share the script include method it is calling, let me see if you can tweak the code to suit you. In the script include you can add the query something like this addQuery('catalog_item', '!=', 'sys_id_of_catalog_item');

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Do you mean the "SC Category Page" widget which calls script include "SCPopularItems"? The Script Include is editable.

Can you describe what your issue is actually? What you are trying to achieve?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn