CA Service Management

Expand all | Collapse all

How can I export from the service desk manager the Notification Rule Contacts data

  • 1.  How can I export from the service desk manager the Notification Rule Contacts data

    Posted Feb 12, 2017 02:56 PM

    I currently have created around 100 Notification Rule and I need to extract the Notification Rule contacts to keep a record of who is contacted when the rules is triggered. I'm currently spending hours trying to extract the each Notification Rule's contacts by using the export feature on the SDM list viewer. How can I export from the service desk manager the Notification Rule Contacts data all at once with column that contain the symbols name of the Notification Rule.



  • 2.  Re: How can I export from the service desk manager the Notification Rule Contacts data

    Posted Feb 12, 2017 05:24 PM

    Hi Guan,


    I know that. But my way is some mixed. If you need this list all the times you can create a custom htmpl file and call the list by use PDM_LIST tag. Define a Web form or menu tree for if you calling this htmpl form to use on admin tree menu. 


    Another way, to run a SQL select script on your sql management console for getting this list.


    I will share my codes tomorrow.


    Best regards,


    Türker



  • 3.  Re: How can I export from the service desk manager the Notification Rule Contacts data

    Posted Feb 12, 2017 05:52 PM

    Hi Türker,

     

    Thanks. Awaiting for tomorrow to view them.

     

    Regards
    GuanHua



  • 4.  Re: How can I export from the service desk manager the Notification Rule Contacts data

    Posted Feb 13, 2017 04:39 AM

    Hi Guan,

     

    I attached a custom htmpl file and jquery.js file. which you wanted.

    You put the htmpl file on "$NXRoot/site/mods/www/htmpl/web/analyst" folder

    put the jquery file on "$NXRoot/site/mods/www/wwwroot/scripts" folder

     

    Then you define a menu tree resource on admin panel

    name: Notification Rule Contacts

    resource: OP=DISPLAY_FORM+HTMPL=list_ntfr_ntfl.htmpl

     

    add this menu tree resource your admin tree like this ;

     

    Also I added some feature (search and excel export) You can export the list to excel (its not run on IE Edge or Windows Edge)

     

    I hope, I can help

    Attachment(s)

    zip
    list_ntfr_ntfl.htmpl.zip   2 KB 1 version
    zip
    jquery.js.zip   79 KB 1 version


  • 5.  Re: How can I export from the service desk manager the Notification Rule Contacts data

    Posted Feb 13, 2017 04:41 AM

    This is javascript function. Its export a table to excel

     

    //run on IE and Chrome
      function fnExcelReport(idx,fileName)
      {
       var tab_text="<table border='2px'><tr bgcolor='#87AFC6'>";
       var textRange; var j=0;
       tab = document.getElementById(idx); // id of table
       for(j = 0 ; j < tab.rows.length ; j++)
       {    
        tab_text=tab_text+tab.rows[j].innerHTML+"</tr>";
        //tab_text=tab_text+"</tr>";
       }
       tab_text= tab_text+"</table>";
       tab_text= tab_text.replace(/<A[^>]*>|<\/A>/g, "");//remove if u want links in your table
       tab_text= tab_text.replace(/<img[^>]*>/gi,""); // remove if u want images in your table
       tab_text= tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); // reomves input params
       var ua = window.navigator.userAgent;
       var msie = ua.indexOf("MSIE ");
       if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./))      // If Internet Explorer
       {
        exportFrame.document.open("txt/html","replace");
        exportFrame.document.write(tab_text);
        exportFrame.document.close();
        exportFrame.focus();
        sa=exportFrame.document.execCommand("SaveAs",true,fileName);
       } 
       else                 //other browser not tested on IE 11
        sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));
       return (sa);
      }


  • 6.  Re: How can I export from the service desk manager the Notification Rule Contacts data

    Posted Feb 19, 2017 12:22 PM

    Hi Türker,

     

    Sorry it took so long to test it out. Need to setup a temp service desk on VM from scratch.

    It seem the htmpl display only the 1.Object contacts.

    I am using the 2. Contacts tab and would like to display the name and Telephone Number.

    Could you give some tips on how to modify your code as it has no Design view.

     



  • 7.  Re: How can I export from the service desk manager the Notification Rule Contacts data

    Posted Feb 16, 2017 09:00 AM

    How do you add the newly created menu tree resource to my admin tree?

     

     

    thank you

    Katherine



  • 8.  Re: How can I export from the service desk manager the Notification Rule Contacts data

    Posted Feb 16, 2017 09:41 AM

    Hi Katherine,

     

    You can go "Administrator tab menu" -> "Security  and Role Management" -> "Role Management"  and click "Menu Trees" And then click to "admin_tree" (defaul admin tree)

     

    Click "File" menu and then click "Copy". A new admin_tree record is appear. You can define "Menu Tree Name" and "Code" field. exmp "admin_tree_special" for name, "admin_tree_special" for code then save it.

    Then open the "admin_tree_special" tree detail and click "Customize Menu"

    Custom admin tree screen is appear. then you can go the following menu tree resource and click right and click "Create New Node"

    Then, define "node name" and "Resource" field on following screen.

    Lastly, you can go "Role Management" again and click the "Web Forms" and then find and click "Administration" web form

    You can change the KEEP.tree_code parameters of resource definition.

     

    Best Regards,

    Türker



  • 9.  Re: How can I export from the service desk manager the Notification Rule Contacts data

    Posted Feb 16, 2017 10:57 AM

    Great information ... I did all those steps but when I click on the new node (Notifications > Object Contact Notifications > Notification Rule contacts)  it just shows the same exact search screen that I see when I click on the node (Notifications > Notification Rules). I don't get the contact name list for related notification rules like in your picture above ... am I missing a step? 

     

     

    thanks

    Katherine



  • 10.  Re: How can I export from the service desk manager the Notification Rule Contacts data

    Posted Feb 20, 2017 02:01 AM

    Hi Katherine,

     

    When click the node can you get any error on screen or write any error on stdlog.x file? And how did you define menu tree resource?

     

    Regards,

    Türker



  • 11.  Re: How can I export from the service desk manager the Notification Rule Contacts data

    Posted Feb 19, 2017 09:38 PM

    Hi Türker,

     

    I did a look at the database tables and used ms sql query to join up multiple tables to have it display the column I need.

    How can I input this query into your form ?

     

    SELECT Rules.sym,CAcnt.alias,CAcnt.pri_phone_number
      FROM [mdb].[dbo].[ntfr] as Rules JOIN [mdb].[dbo].[usp_lrel_ntfr_cntl_att_ntfrl] as RCnt
      on Rules.id =RCnt.ntfr JOIN [mdb].[dbo].[ca_contact] as CAcnt
      on RCnt.cnt=CAcnt.contact_uuid

     



  • 12.  Re: How can I export from the service desk manager the Notification Rule Contacts data
    Best Answer

    Posted Feb 20, 2017 02:29 AM
      |   view attached

    Hi Guan,

     

    I updated the list_ntfr_ntfl.htmpl file and attached it.

     

    Regards,

    Türker

    Attachment(s)

    zip
    list_ntfr_ntfl.htmpl.zip   2 KB 1 version


  • 13.  Re: How can I export from the service desk manager the Notification Rule Contacts data

    Posted Feb 20, 2017 03:25 AM

    Hi Türker,

     

    Thanks. It can now display more and works for me as well. Export was as displayed in the list.

    The filter also works as well.

     

     

    Thank you so much it will save me hours of clicking to compile these section of the data.

     

    Regards

    Guan Hua