Possible to hide from popular items in SP?

John Vo1
Tera Guru

Is it possible to hide a popular item from popping up here?  So if I don't want apple ipad 3 to not show up in the popular item is it possible?

find_real_file.png

1 ACCEPTED SOLUTION

rajneeshbaranwa
Giga Guru

Best Practice would be to create a system property and store comma separated sys_id values of the to be hidden catalog items in this property.

 

Then you can add below one line of the code in Server Script of cloned widget. That is it. You are set.

Next time when you are asked to again exclude/include another catalog item , You just need to add sys_id of the catalog items in the property. No code change required. 

 

find_real_file.png

View solution in original post

47 REPLIES 47

Hi John,

 

In the code as below try adding ^cat_item!=sys_id_of_create_incident' exactly after '...cb84'.

find_real_file.png

 

Or something like below.

count.addEncodedQuery('cat_item!=6d29ed661ba763008009eb186e4bcbab^cat_item!=sys_id_of_incident');

Like this?

find_real_file.png

Yes, just remove the apostrophe 4 & before cat_item! & replace it with

as 4^cat_item!

 

Create incident still shows up after adding to code.

find_real_file.png

Got the reason why. Create Incident would be your Record producer & not Catalog item.

So do the following,

Remove the highlighted part

find_real_file.png

Look for,var count = new GlideAggregate('sc_item_produced_record'); in the same script

& then add below in the very next line.

count.addEncodedQuery('producer!=incident_sys_id');