Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

need help with database view

priyanka chodip
Tera Contributor

Hi There,

i have a requirement to get cases with a,b,c groups that has an sla or not
so i created tables below

priyankachodip_0-1765457617194.pngpriyankachodip_1-1765457670960.png

result looks like below

priyankachodip_2-1765457815351.png

it is acutally getting SCTASK,Case and other as well.
but i need only Case table data.
please advice on it.

Thankyou

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Add a condition to task types or numbers starting with ‘CS’ in the result

 

DrAtulGLNG_0-1765458805445.png

 

*************************************************************************************************************
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]

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

Hi,

but the other issue is its fetching all the assignment groups including the group sysids i gave in the whereclause. 

Hi @priyanka chodip 

Did you try filtering based on the task type to see if it still shows the Sys ID?

*************************************************************************************************************
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]

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

OlaN
Tera Sage
Tera Sage

Hi,

I believe that the Left join should be on the customer_case table (this is the base table and you want this to be the left table in your view).

We did a video on database view recently, and at about 22 min in we discuss the Left join option.

Have a look and see if it helps you.