Pulling sys_history_line field on report on sc_task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2019 01:19 AM
Hi All ,
I have report for fetching sc_task records with previous assignment group A and now reassigned to different assignment group.
I have done this by using script include and calling that script include in report.
Now, I want to show that who has updated the assignment group. To achieve this for particular record, I need to show "user_name" field from sys_history_line table to the existing report on sc_task.
Do we have any solution to achieve this?
I tried with database views, but did not work. I believe , it is not recommended to have database views on sys_history_line and sys_audit tables.
Kindly suggest another option.
Thank you in advance 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2019 01:21 AM
https://community.servicenow.com/community?id=community_blog&sys_id=5ffde62ddbd0dbc01dcaf3231f961917
This has been a helpful for me. Please see if this is of any use for you?
You would have to change the table when you report as you would figure it out when you look at post.
Please mark helpful or Correct.
Regards,
Vikrant Sharma
Thanks & Regards,
Vikrant Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2019 09:25 PM
Hi ,
I have checked article
https://community.servicenow.com/community?id=community_blog&sys_id=5ffde62ddbd0dbc01dcaf3231f961917
But here they are reporting on sys_history_line table
I am looking for other possible approach to fetch the related sc_task records and want to have "user_name" field from "sys_history_table" in the same report on sc_task
Could you please suggest another possible approach to achieve this.
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2019 12:55 AM
The requirements are quite bespoke here, If you are just looking for the previous assignment group and User who changed the assignment group only, you can go for a business rule and individual field for Previous assignment group and User making amendments to the previous assignment group, and update those fields when the assignment group changes, to capture the value for those fields.
OOB as you know it doesn't capture the previous assignment group and who changes the group, so you would have to write the code to get the required values unless, in future there is another requirement to get any other detail for reporting.
Hope this helps?
Thanks & Regards,
Vikrant Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2019 01:24 AM
Hi,
You are correct about recommendation of not having database views with sys_audit or sys_history_line. I wouldn't recommend doing reports on these either. I would try to solve this by a different approach. Since I don't know the exact requirement this might be wrong, but what I'm reading here should be easy solved by a metric that saves the information and then you can use that in the report instead and even make a database view on it. And if you got Performance analytics it would be even easier.
LinkedIn & Twitter
Subscribe to my YouTube Channel
Buy The Witch Doctor's Guide To ServiceNow