The CreatorCon Call for Content is officially open! Get started here.

Join three data base view tables for report

Siva82
Tera Expert

Hi ServiceNow Community,
@Ankur Bawiskar 
@bhuvan 

I'm working on building a metric report on the sc_task table. To achieve this, I created a Database View that includes two tables: incident and metric_instance.

For the initial setup, I used the following Where Clause:

  • Between sc_task and metric_instance:

     
     Sc Task : sc_sys_id = mi_id & (sc_assignment_group != mi_value)
    Metric Instance : metric_instance.definition = "637b0a258797a210f03865bd0ebb359f"

This view works correctly and returns the expected sc_task metric records in the report.

Now, I want to include incident metric records in the same report. So, I added the incident table to the same Database View with the following Where Clause:

Incident inc_sys_id = mi_id & (inc_assignment_group != mi_value)

However, once I added this third table and join, the report stopped returning data. It seems the join across all three tables is not working as expected.

Can you please help me with the task

Thank you 
Sivananda Reddy

5 REPLIES 5

@Siva82 

 

Can you please share screenshots from 3 tables along with custom fields and relationships ? 

 

I am not able to visualize relationship you created for 3 tables and screenshots would help.

 

Thanks,

Bhuvan