Join asmt metric result table with sc req item table Database View

Shivani_singh
Tera Contributor

Hi All,

I want to join tables asmt_metric_result and sc_req_item to create a database views.
Aim is to get field value from RITM for each survey.

 
1 ACCEPTED SOLUTION

@Shivani_singh 

try this, but please enhance if that doesn't work

I believe I have answered all your questions.

You can mark multiple responses as correct as per new community feature. So please do the same.

AnkurBawiskar_1-1747319240222.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

21 REPLIES 21

@Ankur Bawiskar 
Along with the Survey response ,I want to show variable for that particular catalog.
The logic what you gave ,didnt worked out
I have attached the screenshot; can you please me to fix it.
Thank you

@Shivani_singh 

I already informed it should work if you have taken surveys in past for RITM table

If not then it won't show any records in database view

To confirm if my logic works, I updated the table as sn_customerservice_case to see Survey responses on Case records and it worked fine

sc_req_item table also extends task

See below it showed me only Survey responses taken on Case table

case survey response.gif

Also I have records for Case table in Assessment Instances, do you have any for sc_req_item table?

if not then it won't show.

AnkurBawiskar_0-1747314286073.png

 

Approach I shared is correct, it's just that you don't have data to render

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 
It is working now.
Thank you for your efforts.
But still i can't see the field which i want to add in the report which is present in sc_req_item table .
Should i need to add anything else.
Can you please help me on this.

@Shivani_singh 

Glad to know that my approach worked for you.

Please mark my response as correct and close the thread as I answered your original question and the discussion can continue on the same thread.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Shivani_singh 

which field of RITM you want to see?

If you are still using task table then replace that database table with sc_req_item table and update the where clause as this then

like this you can update in the OOTB one or create a database view similar to OOTB and just use sc_req_item table instead of task table

AnkurBawiskar_0-1747315400371.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader