how to JOIN 2 TABLES in SERVICENOW to display different Column data

ankit_sharma487
Kilo Guru

How to JOIN 2 TABLES in SERVICENOW to display different Column data

 

 

- I want so see INCIDENT and SURVEY result in ONE LIST   . plz help

1 ACCEPTED SOLUTION

randrews
Tera Guru

you will need to create a database View to do the join



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



that is the wiki on it.. the easiest way to learn them is to look at the wiki then examine a few in your sub prod instance.. from there play with it.


View solution in original post

7 REPLIES 7

randrews
Tera Guru

you will need to create a database View to do the join



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



that is the wiki on it.. the easiest way to learn them is to look at the wiki then examine a few in your sub prod instance.. from there play with it.


vibhor_dwivedi
Mega Expert

Database_Views would be the best way.


Chris M3
Tera Guru

There is an OOB Database View called task_survey_detail that links the task table to the survey with questions and answers.


Matt88
Kilo Expert

Everyone has covered off the required solution already, but it is one thing to setup your database view and another thing to build your list report.   More often then not, after creating the database view, you end up with columns with the same name or you may wish to rename some of the columns for a specific purpose.



To do this, you need to access the Language File under System Definition and create a new entry for each field to be renamed where table is the name of your database view.   The trick is working out the right element reference as it needs to include the join table alias e.g. if you had two Number fields in your join on the incident table and you wanted to rename the incident number field (incident table has the alias inc), you would specify inc_number as the name of the element.