logo

NJP

Preview/Information Icon in List View Tips & Tricks

Import · Dec 21, 2021 · article

Case#1 : I would like to display only Incident Number, Caller, Short Description when I click on Preview Icon from Incident List view.

  • Go to Incident Table Definition
  • Click on "Layout Form" link under Related Links
  • Ciick on "View name" and select "New" to create the View
  • Provide the name as "sys_popup" (It must be exactly the same name with Lower Case)
  • image
  • Select Number, Caller & Short Description fields from Slush bucket and put that in Right Section.
  • Save it and you will be able to see like this
  • image

Case#2: I would like to show Number, Caller, Short Description for all Users except "Database" Assignment Group Members. Database Group Members needs to see Number, Caller, Short Description, Description fields as well.

  • Go to Incident Table Definition
  • Click on "Layout Form" link under Related Links
  • Ciick on "View name" and select "New" to create the View
  • Provide the name as "DBTeam" and configure all the fields that you want (This is for Form View i.e. what you would like to see when you open a incident record)
  • Save it and again click on "Layout Form" Link under Related Links
  • Ciick on "View name" and select "New" to create the View
  • Provide the name as "sys_popup,dbteam"
  • Select Number, Caller, Short Description & Description fields from Slush bucket and put that in Right Section
  • Save it
  • Go to "System UI" => "View Rules" and create a new record. Write your script like this and save the record.
  • image
  • Impersonate with one of the member from "Database" Group and you will be able to see the details like this when you click on "Preview / Information" Icon
  • image
  • The same information Icon looks like this for other users
  • image

Case#3: I would like to Hide the Preview/Information Icon

  • First choose which Table you wanted to apply the hiding of Preview Icon. Here I have taken Incident Table as an example.
  • Create UI Script as below (Please observe the code and its self explanatory)
  • (function() { addAfterPageLoadedEvent(function() { //I would like to hide Preview Icon for Incident Table. You may add ( or || ) any table of your choice in this (or) condition. if ((window.location.href.indexOf('incident_list') != -1)) { //If Incident, then use "#incident_table" (just add _table to the table name) $j('#incident_table > tbody > tr > td > a[class="btn btn-icon table-btn-lg icon-info list_popup"').each(function() { $j(this).css("display", "none"); }); } }); })(); * image * Save it and open the Incidents in List view. You will be able to see like this * image

Please mark it as helpful and do a bookmark if it helps you. Also, do a comment if anything required.

Thanks,

Narsing

Labels:

image

View original source

https://www.servicenow.com/community/now-platform-articles/preview-information-icon-in-list-view-tips-tricks/ta-p/2322427