- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2017 12:03 AM
Hi everyone,
I use [task_time_worked] to track time worked on Incident and RITM
I want to make a report "group by company"
But Company is not at the same place for both tables :
- In Incident : task_time_worked.task.Incident.CallerId.Company
- In Sc Req Itm : task_time_worked.task.sc_req_item.request.requested_for.Company
What I want to achieve : Having a table that is like this
Created (from task_time_worked) | Time Worked | User (form task_time_worked) | Task Type | Company (from incident AND req_item) |
---|---|---|---|---|
20/08/2017 | 15min | IDE | Inc | Cust1 |
20/08/2017 | 15min | IDE | Req_Item | Cust1 |
In other word, I think I want to make a Union where I can use a "AS Company"
Do you have any clue or advice ?
Thanks a lot
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2017 10:07 PM
Hi everyone,
I finally gave up.
I used a "scripts - background" to fill "compagny" using rules listed above for all Incidents and Requested Item.
I used a Business Rule to fill "company" automatically
I can now report on task.company as wanted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2017 12:06 AM
Hello Dessai,
You can achieve this by using database view.
Refer the below links may helpful to you.
http://wiki.servicenow.com/index.php?title=Database_Views#gsc.tab=0
DATABASE VIEWS* for beginners.
Database View - Joined Tables Shows Multiple Same Results
ServiceNow Commnunity MVP -2018 class.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2017 12:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2017 12:15 AM
You have the option of creating a new Database to merge data from two tables:
System Definition > Database Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2017 02:25 AM
Thanks for all your answer
But I've already looked for Database Views, but it seems that my question was not clear enough
I want to merge both columns (task_time_worked.task.Incident.CallerId.Company and task_time_worked.task.sc_req_item.request.requested_for.Company) in same column in the database view.