Database View with Multlple tables tutorial

StacyLen
Mega Guru

I am in need of a simple tutorial on creating dbase views using multiple tables.  Do NOT want one of the NeedIt tutorials.

 

I get so many hits when I search, its mindboggling, and difficult to sort through.

 

Can someone point towards a simple tutorial of creating/modifying/using dbase views with multiple tables - that you have personally found to be easier to understand and useful

 

Thank you

StacyLen

1 ACCEPTED SOLUTION

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @StacyLen 

 

I am SN trainer and i discussed this with my batch. You will get basic idea. Also see some OOTB Database view

 

LearnNGrowAtul_0-1702570293359.pngLearnNGrowAtul_1-1702570307461.png

 

 

https://youtu.be/QdiTio73Mnc

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

csa #ServiceNow #TechnoFuncational Disclaimer: These videos are from my training batch. These videos did not promote any ServiceNow Sales pitch or marketing. These videos are only for knowledge purposes & basic on my experience & Knowledge. Redistribution or copying of functionality is not ...
3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @StacyLen 

 

I am SN trainer and i discussed this with my batch. You will get basic idea. Also see some OOTB Database view

 

LearnNGrowAtul_0-1702570293359.pngLearnNGrowAtul_1-1702570307461.png

 

 

https://youtu.be/QdiTio73Mnc

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************
csa #ServiceNow #TechnoFuncational Disclaimer: These videos are from my training batch. These videos did not promote any ServiceNow Sales pitch or marketing. These videos are only for knowledge purposes & basic on my experience & Knowledge. Redistribution or copying of functionality is not ...

Thank you.  I will be checking this out carefully

Siddhesh Gawade
Mega Sage
Mega Sage

Hello @StacyLen ,

 

Database view is basically functionality in ServiceNow where you can merge multiple table into one. Those tables can be merged into one by using common field between two table so in your case you would need to find out common field between time worked and time card table.

Follow the step-by-step Process for creating new Database view:

1. Navigate System Definiation > Database Views.

2. Click On New. In this step you just need to set the Database name. This name will be used for navigating to the list view of this database view. Similar to system Tables. 

SiddheshGawade_0-1702571070978.png

 

3. After submiting the database view. We can find a option for adding multiple table, where from we wanted to show data in database view. We add multiple tables.

SiddheshGawade_1-1702571334506.png

 

4. If we wanted to 'Where Clause' we need to add 'Variables Prefix' as well. Variable Prefix gives an option to use table fields from available tables in the database view to create a 'Where Clause'.  See the following support article for using Variable prefix in a Database View .

 

5. Where clause to define the conditions for the join. These conditions can refer to any field, but typically define the join by matching a field in the table to a field in another table in the database view.

When you write the Where clause, add the field name to the Variable prefix of its table with an underscore. In the following example, uprb_parent refers to the parent field in the Problem table and uinc_sys_id refers to the sys_id field in the Incident [incident] table.

 

SiddheshGawade_2-1702571404703.png

 

6. To restrict or specify a field that we want returned by the joined table. We can restrict the fields displayed in the database view output by adding fields to the View Tables related list. If no fields are defined in the View Fields related list, all fields are returned.

SiddheshGawade_3-1702572011217.png

SiddheshGawade_4-1702572037969.png

 

 

7. Test the database view by database_name.LIST. We should be able to see the list view. 

 

Let me know if this help you understand how to create database view. and If you have any further Questions !!!

 

Kindly mark my answer as Correct and helpful based on the Impact.

Regards,

Siddhesh