How to add a column in Group By field of reporting?

rezacol
Mega Expert

Hi Guys,

 

I have a query on how to add some column which are not present in the Group By field on the reporting form for that particular table.

 

Quick help will be much appreciated.

 

Thanks,

Reza

1 ACCEPTED SOLUTION

Mike Moody
Kilo Guru

Hi Reza,



I was able to solve this problem by using the following procedure.


  1. Open the report via the Edit link in the left-nav, export the report to XML.
  2. Edit the <filter> tag in the XML to have the GROUPBY statement target the field name you want.
  3. Save and Import the modified XML file back into the system.

Just keep in mind that if you change this report in the future you will have to repeat this process because the Group By field will be overwritten with the value none.



Example: (I targeted the url field here, which is a field that isn't available to Group By on the syslog_transaction table)


<filter table="syslog_transaction">sys_created_onONToday@javascript:gs.daysAgoStart(0)@javascript:gs.daysAgoEnd(0)^sql_count&gt;0^sys_created_by!=guest^urlSTARTSWITH/u_analytics.do^EQ^GROUPBYurl  



Regards,



Michael Moody


Software Engineer


Milestone Technologies, Inc.






View solution in original post

21 REPLIES 21

rezacol
Mega Expert

Harikrishnan Vijayan Yes those fields are dot walked.. but problem is that some of the related fields are showing but not everyone. So I was wondering whether there is some attributes or method to display those related fields. The fields which are dot walked to a table is user defined.


Hi Reza Ur Rahman



Please check the section 3.1 in the below wiki link if this helps


http://wiki.servicenow.com/index.php?title=Personalizing_Lists



Thanks,


Pradeep


Nothing like that, any field in that table, you should be able to add via dot walking.If you are able to add it your form, no reason why it shouldn't show up in the Group By field. You can try a logoff and login to your instance, also clear system cache once just to be sure.



Thanks & Regards,


Hari


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

I dont think that you should have such an issue in reports.


Please check if you are able to replicate this issue in any demo instance.



Thanks,


Pradeep Sharma


rezacol
Mega Expert

pradeep Sharma All instances are having the same issue.


Harikrishnan Vijayan After doing some research I found out that in list view, when I am right clicking on that field my Group By that column name is disabled and that is the reason why it is not showing in the report group by list dropdown also. How to enable that action ??



Thanks,


Reza