Narsing1
Mega Sage

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)
  • find_real_file.png
  • 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
  • find_real_file.png

 

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.
  • find_real_file.png
  • 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 
  • find_real_file.png
  • The same information Icon looks like this for other users
  • find_real_file.png

 

 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");
                });
            }
        });
    })();

     

     

  • find_real_file.png
  • Save it and open the Incidents in List view.  You will be able to see like this
  • find_real_file.png

 

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

Thanks,

Narsing

 

 

 

Comments
smrithi
Tera Contributor

Is there anyway to make the sys_popup view form be editable? 
We have one requirement to make the form editable instead of open record button

Pooja58
Kilo Sage

I Have a report added to a dashboard on portal, customer don't want to see this i icon on this report in the list view, how can I remove it?
under window.location.href.indexof I have given dashboard link containing report sys_id, but still i icon is visible. 

Narsing1
Mega Sage

Recently came across one more case.  Here you go.

 

Case#4: I would like to hide the preview icon on the Related List of a form

  • Right click on the Preview Icon where you would like to hide on the Related List like this. Here I took Task SLA related list on the Incident form.
  • Screenshot 2024-08-04 081504.png
  • In this case, I would like to Hide the Task SLA Related List Preview icon.  So just took the HTML Table ID of it and my id is "incident.task_sla.task_table".
  • Screenshot 2024-08-04 081920.png
  • Now, create a UI Script like this 

    Note: Cell[1] will be always a preview Icon.  So you can have a hardcoded one.

Screenshot 2024-08-04 082107.png

 

 

 

(function() {
    addAfterPageLoadedEvent(function() {
        if ((window.location.href.indexOf('incident.do') != -1)) {
            var table = document.getElementById("incident.task_sla.task_table");
            for (var i = 0; i < table.rows.length; i++) {
                table.rows[i].cells[1].style.display = "none";
            }
        }
    });
})();

 

 

 

You are done and the final result is like this

Before#

Screenshot 2024-08-04 082255.png

After#

Screenshot 2024-08-04 082411.png

Thanks,

Narsing

 

Pooja58
Kilo Sage

Hello,

 

Thanks for your reply, will check this solution.

 

Best Regards,

Pooja

VasukiS
Tera Guru

Will this work in CSM View ?

Narsing1
Mega Sage

It works independent of the view as it is taking a part of the url into consideration

kshaw
Giga Guru

I have implemented case #2 on the sys_user table for a HR view.

It does not work.

Screenshot 2025-04-22 at 11.47.00.png

 

Screenshot 2025-04-22 at 11.48.16.png

Narsing1
Mega Sage

Looks like you are combining both 1 and 2.

Can you please create a new view with some other name apart form sys_popup and change the view on the list view to that name and try

 

Thanks,

Narsing

Version history
Last update:
‎12-20-2021 10:33 PM
Updated by: