How do I remove catalog items from the main page when I click on Service Catalog

Kaz9
Giga Expert

Here is a screen shot of what it looks like when I click on service catalog (order something). It populates options on the right hand side of the catalog and I can't figure out how to adjust what shows there to add or remove catalog items.

I want to remove the Other Software Request and Other Hardware Request, just from that screen. I still want to keep those catalog items in their perspective categories. Too many people are just clicking on those options rather than just going to the hardware or software Categories tab.

Thanks for all of your help! I love the servicenow community!

1 ACCEPTED SOLUTION

I found the answer on this thread hereRemoving certain catalog items from Popular Items Widget in Istanbul




I added this line


count.addQuery('cat_item.name', 'DOES NOT CONTAIN', 'Other');



that filtered out anything that had Other in the name.


View solution in original post

5 REPLIES 5

Jaspal Singh
Mega Patron
Mega Patron

Hi Zachary,



You can have a User criteria set up & gets visibility for those items defined.


Thank you for your reply. I want everyone to be able to see those items, just not when the page first loads, before they click on the software or hardware category tabs. Maybe you could explain it in further detail for me, because I might be missing what you're saying. I am somewhat familiar with user criteria to show / hide access to those options but I just don't want the options right there when the page loads. Sorry I'm still new to ServiceNow and am still learning.


randrews
Tera Guru

ok since this is the service portal a lot depends on how you are displaying it.. what widget have you got showing on the right... that is controlling what is displaying there.


sorry i'm pretty new, could you please direct me on how to find out which widget I am using there?





*********************EDIT**************************


okay I found out how to find it. If you ctrl + right click on the window it will tell you which widget you are using.



attached is a screen shot of the widget in the widget editor.





So I guess I just need to figure out how to exclude those catalog items in this server script



data.sc_catalog = $sp.getValue('sc_catalogs') || $sp.getValue('sc_catalog');


data.showPrices = $sp.showCatalogPrices();


data.limit = options.limit || 9;


var items = [];




var count = new GlideAggregate('sc_req_item');


count.addAggregate('COUNT','cat_item');


count.groupBy('cat_item');


count.addQuery('cat_item.sys_class_name', 'NOT IN', 'sc_cat_item_guide,sc_cat_item_wizard,sc_cat_item_content');


count.addQuery('cat_item.category', 'NOT IN', '207d8b221380ba00d9ff30ded144b06c');


count.addQuery('cat_item.sc_catalogs', 'IN', data.sc_catalog);


count.orderByAggregate('COUNT', 'cat_item');


count.query();


while (count.next() && items.length < data.limit) {


  if (!$sp.canReadRecord("sc_cat_item", count.cat_item.sys_id.getDisplayValue()))


      continue; // user does not have permission to see this item




  var item = {};


  item.count = count.getAggregate('COUNT', 'cat_item');


  item.name = count.cat_item.name.getDisplayValue();


  item.short_description = count.cat_item.short_description.getDisplayValue();


  item.picture = count.cat_item.picture.getDisplayValue();


  item.price = count.cat_item.price.getDisplayValue();


  item.sys_id = count.cat_item.sys_id.getDisplayValue();


  items.push(item);


}




if (options.include_record_producers == 'true' || options.include_record_producers == true) {


var producers = 0;


count = new GlideAggregate('sp_log');


count.addAggregate('COUNT', 'id');


count.groupBy('id');


count.addQuery('type', 'Catalog Request');


count.addQuery('table', 'sc_cat_item_producer');


count.orderByAggregate('COUNT', 'id');


count.query();


while (count.next() && producers < data.limit) {


if (!$sp.canReadRecord("sc_cat_item", count.getValue('id')))


continue; // user does not have permission to see this item




var item = {};


item.count = count.getAggregate('COUNT', 'id');


item.name = count.id.name.getDisplayValue();


item.short_description = count.id.short_description.getDisplayValue();


item.picture = count.id.picture.getDisplayValue();


item.price = count.id.price.getDisplayValue();


item.sys_id = count.id.sys_id.getDisplayValue();


items.push(item);


producers++;


}


}




data.items = items;